Remove unnecessary while loop
This commit is contained in:
parent
8eb74de2e8
commit
c5d979e5dc
@ -235,27 +235,24 @@ public class Outpost implements Listener
|
|||||||
{
|
{
|
||||||
if (getState() == OutpostState.LIVE)
|
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)
|
UtilPlayer.message(event.getPlayer(), F.main("Clans", "You cannot open the doors of this Outpost."));
|
||||||
break;
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getState() != OutpostState.AWAITING)
|
if (getState() != OutpostState.AWAITING)
|
||||||
|
Loading…
Reference in New Issue
Block a user