From c96b8e243e101a67beeffa2c8cc37372c88a12d7 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Thu, 16 Jul 2026 17:20:49 +0800 Subject: [PATCH] Enhance link type color handling for NETHER and END in WorldLinkType --- .../multiverse/netherportals/commands/ListCommand.java | 8 ++++---- .../multiverse/netherportals/links/WorldLinkType.java | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/mvplugins/multiverse/netherportals/commands/ListCommand.java b/src/main/java/org/mvplugins/multiverse/netherportals/commands/ListCommand.java index a618a65..087cc5b 100644 --- a/src/main/java/org/mvplugins/multiverse/netherportals/commands/ListCommand.java +++ b/src/main/java/org/mvplugins/multiverse/netherportals/commands/ListCommand.java @@ -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]"); + }; } } diff --git a/src/main/java/org/mvplugins/multiverse/netherportals/links/WorldLinkType.java b/src/main/java/org/mvplugins/multiverse/netherportals/links/WorldLinkType.java index 18502fb..c4d962d 100644 --- a/src/main/java/org/mvplugins/multiverse/netherportals/links/WorldLinkType.java +++ b/src/main/java/org/mvplugins/multiverse/netherportals/links/WorldLinkType.java @@ -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; } /** @@ -68,6 +70,6 @@ public enum WorldLinkType implements LocalizableMessage { @Override public @Nullable Message getLocalizableMessage() { - return Message.of(getConfigKey()); + return Message.of(colourCode + getConfigKey()); } }