Prevent extra colour codes from creating...

...Essentials signs
This commit is contained in:
AdamQpzm 2015-12-28 22:06:04 +00:00
parent 540fa98a44
commit 19dcb33eb7

View file

@ -86,7 +86,7 @@ public class SignBlockListener implements Listener {
//We loop through all sign types here to prevent clashes with preexisting signs later
for (Signs signs : Signs.values()) {
final EssentialsSign sign = signs.getSign();
if (topLine.equalsIgnoreCase(sign.getSuccessName())) {
if (topLine.endsWith(sign.getSuccessName()) && ChatColor.stripColor(topLine).equalsIgnoreCase(ChatColor.stripColor(sign.getSuccessName()))) {
event.setLine(0, ChatColor.stripColor(topLine));
}
}