mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-14 10:34:41 +02:00
@@ -51,6 +51,13 @@ public class SignBlockListener implements Listener
|
|||||||
|
|
||||||
public boolean protectSignsAndBlocks(final Block block, final Player player)
|
public boolean protectSignsAndBlocks(final Block block, final Player player)
|
||||||
{
|
{
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
final int mat = block.getTypeId();
|
final int mat = block.getTypeId();
|
||||||
if (mat == SIGN_POST || mat == WALL_SIGN)
|
if (mat == SIGN_POST || mat == WALL_SIGN)
|
||||||
{
|
{
|
||||||
@@ -64,12 +71,6 @@ public class SignBlockListener implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 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 : plugin.getSettings().getEnabledSigns())
|
for (EssentialsSign sign : plugin.getSettings().getEnabledSigns())
|
||||||
{
|
{
|
||||||
if (sign.getBlocks().contains(block.getType()) && !sign.onBlockBreak(block, player, ess))
|
if (sign.getBlocks().contains(block.getType()) && !sign.onBlockBreak(block, player, ess))
|
||||||
|
Reference in New Issue
Block a user