mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Slightly widen block break protection on protected signs (still does not block chain breaks).
This commit is contained in:
parent
00c87c0e60
commit
8da3b490d9
1 changed files with 10 additions and 13 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue