Fix TNT bug in SG - tested, works fine! :)
This commit is contained in:
parent
2679d19a81
commit
7f7edddf42
@ -2,14 +2,6 @@ package nautilus.game.arcade.kit.perks;
|
|||||||
|
|
||||||
import java.util.HashSet;
|
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.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
import mineplex.core.common.util.UtilInv;
|
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.common.util.UtilServer;
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import nautilus.game.arcade.kit.Perk;
|
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
|
public class PerkBomberHG extends Perk
|
||||||
{
|
{
|
||||||
private int _spawnRate;
|
private int _spawnRate;
|
||||||
@ -86,8 +86,15 @@ public class PerkBomberHG extends Perk
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@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);
|
UtilInv.DisallowMovementOf(event, "Throwing TNT", Material.TNT, (byte) 0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user