1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 17:45:08 +02:00

Missing event aborts in sign code.

This commit is contained in:
KHobbits
2012-06-10 19:40:09 +01:00
parent 3b855255cf
commit dd7f1bcf25
2 changed files with 15 additions and 0 deletions

View File

@@ -199,6 +199,11 @@ public class SignBlockListener implements Listener
@EventHandler(priority = EventPriority.LOW) @EventHandler(priority = EventPriority.LOW)
public void onBlockPistonExtend(final BlockPistonExtendEvent event) public void onBlockPistonExtend(final BlockPistonExtendEvent event)
{ {
if (ess.getSettings().areSignsDisabled())
{
return;
}
for (Block block : event.getBlocks()) for (Block block : event.getBlocks())
{ {
if (((block.getTypeId() == WALL_SIGN if (((block.getTypeId() == WALL_SIGN
@@ -224,6 +229,11 @@ public class SignBlockListener implements Listener
@EventHandler(priority = EventPriority.LOW) @EventHandler(priority = EventPriority.LOW)
public void onBlockPistonRetract(final BlockPistonRetractEvent event) public void onBlockPistonRetract(final BlockPistonRetractEvent event)
{ {
if (ess.getSettings().areSignsDisabled())
{
return;
}
if (event.isSticky()) if (event.isSticky())
{ {
final Block block = event.getBlock(); final Block block = event.getBlock();

View File

@@ -22,6 +22,11 @@ public class SignEntityListener implements Listener
@EventHandler(priority = EventPriority.LOW) @EventHandler(priority = EventPriority.LOW)
public void onEntityExplode(final EntityExplodeEvent event) public void onEntityExplode(final EntityExplodeEvent event)
{ {
if (ess.getSettings().areSignsDisabled())
{
return;
}
for (Block block : event.blockList()) for (Block block : event.blockList())
{ {
if (((block.getTypeId() == Material.WALL_SIGN.getId() if (((block.getTypeId() == Material.WALL_SIGN.getId()