Less sign checking if certain signs aren't enabled.

This commit is contained in:
KHobbits 2012-09-23 23:51:57 +01:00
parent 8e6d4b1595
commit d722e6a9f0

View File

@ -98,9 +98,8 @@ public class SignBlockListener implements Listener
return;
}
for (Signs signs : Signs.values())
for (EssentialsSign sign : ess.getSettings().enabledSigns())
{
final EssentialsSign sign = signs.getSign();
if (event.getLine(0).equalsIgnoreCase(sign.getSuccessName()))
{
event.setCancelled(true);
@ -137,9 +136,8 @@ public class SignBlockListener implements Listener
{
return;
}
for (Signs signs : Signs.values())
for (EssentialsSign sign : ess.getSettings().enabledSigns())
{
final EssentialsSign sign = signs.getSign();
if (sign.getBlocks().contains(block.getType())
&& !sign.onBlockPlace(block, event.getPlayer(), ess))
{