Improve fake sign check.

This commit is contained in:
KHobbits 2012-09-24 22:43:27 +01:00
parent 94dc29cc4d
commit 3055dd93a5

View File

@ -88,6 +88,16 @@ public class SignBlockListener implements Listener
{ {
event.setLine(i, Util.formatString(user, "essentials.signs", event.getLine(i))); event.setLine(i, Util.formatString(user, "essentials.signs", event.getLine(i)));
} }
final String topLine = event.getLine(0);
for (Signs signs : Signs.values())
{
final EssentialsSign sign = signs.getSign();
if (topLine.equalsIgnoreCase(sign.getSuccessName()))
{
event.setLine(0, Util.stripFormat(topLine));
}
}
} }
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)