Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ private String autoString() {
}

private Message getLinkTypeColoured(@NotNull WorldLinkType linkType) {
ChatColor primaryColor = linkType == WorldLinkType.NETHER ? ChatColor.RED : ChatColor.AQUA;
ChatColor secondaryColor = linkType == WorldLinkType.NETHER ? ChatColor.DARK_RED : ChatColor.DARK_AQUA;
return Message.of(secondaryColor + "[" + primaryColor + linkType.getConfigKey()
+ secondaryColor + "]");
return switch (linkType) {
case NETHER -> Message.of("&4[&cnether&4]");
case END -> Message.of("&3[&bend&3]");
};
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
@ApiStatus.AvailableSince("5.1")
public enum WorldLinkType implements LocalizableMessage {

NETHER(PortalType.NETHER),
END(PortalType.ENDER);
NETHER(PortalType.NETHER, "&c"),
END(PortalType.ENDER, "&b");

private final PortalType portalType;
private final String colourCode;

WorldLinkType(PortalType portalType) {
WorldLinkType(PortalType portalType, String colourCode) {
this.portalType = portalType;
this.colourCode = colourCode;
}

/**
Expand Down Expand Up @@ -68,6 +70,6 @@ public enum WorldLinkType implements LocalizableMessage {

@Override
public @Nullable Message getLocalizableMessage() {
return Message.of(getConfigKey());
return Message.of(colourCode + getConfigKey());
}
}
Loading