No more opening inventories with ability tools. Fixes #2416

This commit is contained in:
t00thpick1 2015-01-25 22:54:41 -05:00
parent 385fe1bb05
commit 687f87a748

View File

@ -315,6 +315,11 @@ public class InventoryListener implements Listener {
SkillUtils.removeAbilityBuff(event.getCurrentItem()); SkillUtils.removeAbilityBuff(event.getCurrentItem());
} }
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onInventoryOpenEvent(InventoryOpenEvent event) {
SkillUtils.removeAbilityBuff(event.getPlayer().getItemInHand());
}
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onCraftItem(CraftItemEvent event) { public void onCraftItem(CraftItemEvent event) {
final HumanEntity whoClicked = event.getWhoClicked(); final HumanEntity whoClicked = event.getWhoClicked();