mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-25 07:30:56 +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
|
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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user