mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-24 23:25:46 +02:00
Slightly widen block break protection on protected signs (still does not block chain breaks).
This commit is contained in:
@@ -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
|
||||
if (EssentialsSign.checkIfBlockBreaksSigns(block))
|
||||
LOGGER.log(Level.INFO, "Prevented that a block was broken next to a sign.");
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user