Fixed infinite exp with block breaking in MMOCore

This commit is contained in:
Indyuce 2021-08-09 22:11:19 +02:00
parent fc4f652f5d
commit 37cbccde05

View File

@ -153,7 +153,13 @@ public class ItemUse implements Listener {
event.setDamage(result.getDamage());
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
/*
* 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)
public void specialToolAbilities(BlockBreakEvent event) {
Player player = event.getPlayer();
Block block = event.getBlock();