Slightly widen block break protection on protected signs (still does not block chain breaks).

This commit is contained in:
KHobbits 2012-04-18 01:30:14 +01:00
parent 00c87c0e60
commit 8da3b490d9

View file

@ -57,23 +57,20 @@ public class SignBlockListener implements Listener
} }
} }
} }
else // prevent any signs be broken by destroying the block they are attached to
if (EssentialsSign.checkIfBlockBreaksSigns(block))
{ {
// prevent any signs be broken by destroying the block they are attached to LOGGER.log(Level.INFO, "Prevented that a block was broken next to a sign.");
if (EssentialsSign.checkIfBlockBreaksSigns(block)) return true;
}
for (EssentialsSign sign : ess.getSettings().enabledSigns())
{
if (sign.getBlocks().contains(block.getType())
&& !sign.onBlockBreak(block, player, ess))
{ {
LOGGER.log(Level.INFO, "Prevented that a block was broken next to a sign."); LOGGER.log(Level.INFO, "A block was protected by a sign.");
return true; return true;
} }
for (EssentialsSign sign : ess.getSettings().enabledSigns())
{
if (sign.getBlocks().contains(block.getType())
&& !sign.onBlockBreak(block, player, ess))
{
LOGGER.log(Level.INFO, "A block was protected by a sign.");
return true;
}
}
} }
return false; return false;
} }