diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/hotbar/HotbarEditor.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/hotbar/HotbarEditor.java index 88b9411c9..364028b29 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/hotbar/HotbarEditor.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gladiators/hotbar/HotbarEditor.java @@ -14,6 +14,7 @@ import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.player.PlayerCommandPreprocessEvent; +import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.inventory.Inventory; @@ -127,11 +128,24 @@ public class HotbarEditor extends MiniPlugin if (UtilItem.isSimilar(item, _item, UtilItem.ItemAttribute.NAME)) { + event.setCancelled(true); HotbarInventory.open(event.getPlayer(), this); } } } + @EventHandler + public void onInteract(PlayerInteractEntityEvent event) + { + ItemStack item = event.getPlayer().getItemInHand(); + + if (UtilItem.isSimilar(item, _item, UtilItem.ItemAttribute.NAME)) + { + event.setCancelled(true); + HotbarInventory.open(event.getPlayer(), this); + } + } + public Gladiators getHost() { return _host;