Merge pull request #328 from AdamQpzm/2.x

Prevent extra colour codes from creating Essentials signs
This commit is contained in:
Blinky™ 2015-12-28 15:15:49 -07:00
commit c56dd6e302

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));
}
}