Fixes the color inconsistency for the portal selection "arrows" for gates with colored names

This commit is contained in:
Kristian Knarvik 2021-10-10 17:21:19 +02:00
parent b847002617
commit 69a62c921c

View File

@ -82,9 +82,11 @@ public final class SignHelper {
if (freeGatesGreen) {
Portal destination = PortalHandler.getByName(portal.getDestinationName(), portal.getNetwork());
boolean green = PermissionHelper.isFree(portal.getActivePlayer(), portal, destination);
Stargate.setLine(sign, signLineIndex, (green ? ChatColor.DARK_GREEN : "") + ">" + portal.getDestinationName() + "<");
Stargate.setLine(sign, signLineIndex, (green ? ChatColor.DARK_GREEN : "") + ">" +
portal.getDestinationName() + (green ? ChatColor.DARK_GREEN : "") + "<");
} else {
Stargate.setLine(sign, signLineIndex, " >" + portal.getDestinationName() + "< ");
Stargate.setLine(sign, signLineIndex, ChatColor.BLACK + " >" + portal.getDestinationName() +
ChatColor.BLACK + "< ");
}
}