mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-03-11 13:11:50 +01:00
Better handling of tools and fake events, hopefully fixes #1002
This commit is contained in:
parent
86d1e18baa
commit
79bb6d2d3c
@ -136,16 +136,12 @@ public class ItemUse implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event priority set to LOW to fix an infinite-exp glitch with
|
||||
* MMOCore. MMOCore experience source listens on HIGH and must be
|
||||
* higher than this event otherwise the exp is given even if the
|
||||
* block is not broken.
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||
public void specialToolAbilities(BlockBreakEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
Block block = event.getBlock();
|
||||
if (UtilityMethods.isFake(event)) return;
|
||||
|
||||
final Player player = event.getPlayer();
|
||||
final Block block = event.getBlock();
|
||||
if (player.getGameMode() == GameMode.CREATIVE)
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user