diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java index b3813ac82..9f0d47163 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/siege/outpost/Outpost.java @@ -235,27 +235,24 @@ public class Outpost implements Listener { if (getState() == OutpostState.LIVE) { - do + if (event.getClickedBlock() == null) + return; + + if (event.getAction() != Action.RIGHT_CLICK_BLOCK) + return; + + if (!UtilItem.isDoor(event.getClickedBlock().getType())) + return; + + if (_ownerClan.isMember(event.getPlayer())) + return; + + if (UtilAlg.inBoundingBox(event.getClickedBlock().getLocation(), _startCorner.clone().subtract(.5, 0, .5), _endCorner)) { - if (event.getClickedBlock() == null) - break; - - if (event.getAction() != Action.RIGHT_CLICK_BLOCK) - break; - - if (!UtilItem.isDoor(event.getClickedBlock().getType())) - break; - - if (_ownerClan.isMember(event.getPlayer())) - break; - - if (UtilAlg.inBoundingBox(event.getClickedBlock().getLocation(), _startCorner.clone().subtract(.5, 0, .5), _endCorner)) - { - UtilPlayer.message(event.getPlayer(), F.main("Clans", "You cannot open the doors of this Outpost.")); - event.setCancelled(true); - return; - } - } while(false); + UtilPlayer.message(event.getPlayer(), F.main("Clans", "You cannot open the doors of this Outpost.")); + event.setCancelled(true); + return; + } } if (getState() != OutpostState.AWAITING)