mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Fix CraftBukkit / Bukkit bug regarding event.getCurrentItem() throwing
an ArrayIndexOutOfBounds error.
This commit is contained in:
parent
b2f400f61a
commit
1313e3fe4b
@ -153,6 +153,8 @@ public class InventoryListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onInventoryClickEvent(InventoryClickEvent event) {
|
public void onInventoryClickEvent(InventoryClickEvent event) {
|
||||||
|
if (event.getSlot() >= 0) {
|
||||||
SkillUtils.removeAbilityBuff(event.getCurrentItem());
|
SkillUtils.removeAbilityBuff(event.getCurrentItem());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user