diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBomberHG.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBomberHG.java index e8ebeb497..947e7a3aa 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBomberHG.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBomberHG.java @@ -2,14 +2,6 @@ package nautilus.game.arcade.kit.perks; import java.util.HashSet; -import org.bukkit.Material; -import org.bukkit.Sound; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.entity.PlayerDeathEvent; -import org.bukkit.event.inventory.InventoryClickEvent; -import org.bukkit.event.player.PlayerDropItemEvent; - import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilInv; @@ -17,10 +9,18 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.itemstack.ItemStackFactory; import mineplex.core.recharge.Recharge; -import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; import nautilus.game.arcade.kit.Perk; +import org.bukkit.Material; +import org.bukkit.Sound; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.event.player.PlayerDropItemEvent; + public class PerkBomberHG extends Perk { private int _spawnRate; @@ -86,8 +86,15 @@ public class PerkBomberHG extends Perk } @EventHandler - public void FletchInvClick(InventoryClickEvent event) - { + public void TNTInvClick(InventoryClickEvent event) + { + //boolean containerOpen = !(event.getView().getTopInventory().getHolder() instanceof Player); + boolean clickInContainer = event.getClickedInventory() != null && !(event.getClickedInventory().getHolder() instanceof Player); + + if(clickInContainer) + { + return; + } UtilInv.DisallowMovementOf(event, "Throwing TNT", Material.TNT, (byte) 0, true); }