diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java index 307ab735a..330fd09b2 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/bridge/Bridge.java @@ -31,6 +31,7 @@ import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.event.inventory.PrepareItemCraftEvent; import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.event.player.PlayerBucketEmptyEvent; +import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.CraftingInventory; import org.bukkit.inventory.ItemStack; import org.bukkit.scoreboard.Score; @@ -40,6 +41,8 @@ import mineplex.core.common.Rank; import mineplex.core.common.util.C; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilEvent; +import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilTime; @@ -297,6 +300,31 @@ public class Bridge extends TeamGame implements OreObsfucation return ItemStackFactory.Instance.CreateStack(stack.getTypeId(), amount); } + + @EventHandler + public void ChestDeny(PlayerInteractEvent event) + { + if (_bridgesDown) + return; + + if (event.getClickedBlock() == null) + return; + + if (event.getClickedBlock().getType() != Material.CHEST) + return; + + if (!UtilEvent.isAction(event, ActionType.R_BLOCK)) + return; + + for (Location loc : WorldData.GetCustomLocs("54")) + { + if (loc.getBlock().equals(event.getClickedBlock())) + { + event.setCancelled(true); + return; + } + } + } private void ParseOre(ArrayList teamOre) {