summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-01-29 01:42:55 +0000
committerKHobbits <rob@khobbits.co.uk>2012-01-29 01:42:55 +0000
commit27365d1f1bd3f6dfbdcd62b66af182cee2fae0a4 (patch)
treecf2aab0867bda1d0e35f6365c58480106ca785bb
parentebb3a774300479fac5cf059a8f1dbb5ae0f947ef (diff)
downloadEssentials-27365d1f1bd3f6dfbdcd62b66af182cee2fae0a4.tar
Essentials-27365d1f1bd3f6dfbdcd62b66af182cee2fae0a4.tar.gz
Essentials-27365d1f1bd3f6dfbdcd62b66af182cee2fae0a4.tar.lz
Essentials-27365d1f1bd3f6dfbdcd62b66af182cee2fae0a4.tar.xz
Essentials-27365d1f1bd3f6dfbdcd62b66af182cee2fae0a4.zip
Prevent disabled sign creation (if any of essentials signs are enabled)
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java
index 2ddb42c36..e57919ab1 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignBlockListener.java
@@ -90,8 +90,9 @@ public class SignBlockListener implements Listener
event.setLine(i, event.getLine(i).replaceAll("&([0-9a-f])", "ยง$1"));
}
}
- for (EssentialsSign sign : ess.getSettings().enabledSigns())
+ for (Signs signs : Signs.values())
{
+ final EssentialsSign sign = signs.getSign();
if (event.getLine(0).equalsIgnoreCase(sign.getSuccessName()))
{
event.setCancelled(true);
@@ -128,8 +129,9 @@ public class SignBlockListener implements Listener
{
return;
}
- for (EssentialsSign sign : ess.getSettings().enabledSigns())
+ for (Signs signs : Signs.values())
{
+ final EssentialsSign sign = signs.getSign();
if (sign.getBlocks().contains(block.getType())
&& !sign.onBlockPlace(block, event.getPlayer(), ess))
{