mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-11-25 11:35:35 +01:00
* BUG: Fix item frame events priority and cancellation handling.
This commit is contained in:
parent
3ea55f5fb2
commit
a90418d3a1
@ -240,7 +240,7 @@ public class MapItemManager implements Listener
|
||||
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGH)
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
static public void onEntityDamage(EntityDamageByEntityEvent event)
|
||||
{
|
||||
if(event.isCancelled()) return;
|
||||
@ -250,9 +250,10 @@ public class MapItemManager implements Listener
|
||||
onItemFrameRemove((ItemFrame)event.getEntity(), (Player)event.getDamager(), event);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
static public void onEntityInteract(PlayerInteractEntityEvent event)
|
||||
{
|
||||
if(event.isCancelled()) return;
|
||||
if(!(event.getRightClicked() instanceof ItemFrame)) return;
|
||||
|
||||
onItemFramePlace((ItemFrame)event.getRightClicked(), event.getPlayer(), event);
|
||||
|
Loading…
Reference in New Issue
Block a user