diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBomber.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBomber.java index c2e3dd271..db7bd7830 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBomber.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkBomber.java @@ -6,6 +6,7 @@ import mineplex.core.recharge.*; import mineplex.core.updater.*; import mineplex.core.updater.event.*; import nautilus.game.arcade.kit.*; + import org.bukkit.*; import org.bukkit.block.*; import org.bukkit.entity.*; @@ -133,6 +134,26 @@ public class PerkBomber extends Perk @EventHandler public void TNTInvClick(InventoryClickEvent event) { + // If they have a inventory open + if (event.getView().getTopInventory().getHolder() instanceof Player) + { + return; + } + + // If they are clicking in their own inventory + if (event.getClickedInventory() != null && event.getClickedInventory().getHolder() instanceof Player) + { + // If its not a shift click + if (!event.isShiftClick()) + { + return; + } + } // Else if they are not clicking in their own inventory make sure they don't have tnt in their hands + else if (event.getCursor() == null || event.getCursor().getType() != Material.TNT) + { + return; + } + UtilInv.DisallowMovementOf(event, "Throwing TNT", Material.TNT, (byte) 0, true); }