From 94522c237f46f96a72b9e336530ae9e7c0420375 Mon Sep 17 00:00:00 2001 From: TreemanKing <67459602+TreemanKing@users.noreply.github.com> Date: Sun, 12 May 2024 12:13:27 +1000 Subject: [PATCH] feat: add support for hex colour codes on spigot * Update Lang.java https://www.spigotmc.org/threads/chatcolor-implementation-%C2%A7x-x.505831/ * Update Lang Files * Add version requirement --- .../main/java/com/sekwah/advancedportals/core/util/Lang.java | 2 +- lang/src/main/resources/lang/de_DE.lang | 1 + lang/src/main/resources/lang/en_GB.lang | 1 + lang/src/main/resources/lang/fr_FR.lang | 1 + lang/src/main/resources/lang/hu_HU.lang | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/sekwah/advancedportals/core/util/Lang.java b/core/src/main/java/com/sekwah/advancedportals/core/util/Lang.java index a3922953..42465626 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/util/Lang.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/util/Lang.java @@ -43,7 +43,7 @@ public class Lang { if (instance.languageMap.containsKey(s)) { String translation = instance.languageMap.get(s); // noinspection ALL (not sure what the specific warning is for escaped unicode) - translation = translation.replaceAll("&([0-9a-frk-o])", "\u00A7$1"); + translation = translation.replaceAll("&([0-9a-frk-ox])", "\u00A7$1"); return translation; } else { return s; diff --git a/lang/src/main/resources/lang/de_DE.lang b/lang/src/main/resources/lang/de_DE.lang index 533d8786..4c26065e 100644 --- a/lang/src/main/resources/lang/de_DE.lang +++ b/lang/src/main/resources/lang/de_DE.lang @@ -29,6 +29,7 @@ # &n Underline # &o Italic # &r Reset +# &x Hex Color (#aa5f10 represented by &x&a&a&5&f&1&0) - Spigot 1.16.1+ # # Also note that some debug messages may not be listed here for translation. # diff --git a/lang/src/main/resources/lang/en_GB.lang b/lang/src/main/resources/lang/en_GB.lang index 0fade746..457d64ab 100644 --- a/lang/src/main/resources/lang/en_GB.lang +++ b/lang/src/main/resources/lang/en_GB.lang @@ -29,6 +29,7 @@ # &n Underline # &o Italic # &r Reset +# &x Hex Color (#aa5f10 represented by &x&a&a&5&f&1&0) - Spigot 1.16.1+ # # Some debug messages may not be listed here for translation. diff --git a/lang/src/main/resources/lang/fr_FR.lang b/lang/src/main/resources/lang/fr_FR.lang index ded0d2bb..0aff3d96 100644 --- a/lang/src/main/resources/lang/fr_FR.lang +++ b/lang/src/main/resources/lang/fr_FR.lang @@ -29,6 +29,7 @@ # &n Underline # &o Italic # &r Reset +# &x Hex Color (#aa5f10 represented by &x&a&a&5&f&1&0) - Spigot 1.16.1+ # # Some debug messages may not be listed here for translation. diff --git a/lang/src/main/resources/lang/hu_HU.lang b/lang/src/main/resources/lang/hu_HU.lang index 10c43435..a4da968b 100644 --- a/lang/src/main/resources/lang/hu_HU.lang +++ b/lang/src/main/resources/lang/hu_HU.lang @@ -29,6 +29,7 @@ # &n Underline # &o Italic # &r Reset +# &x Hex Color (#aa5f10 represented by &x&a&a&5&f&1&0) - Spigot 1.16.1+ # # Vegye figyelembe, hogy néhány hibaelhárító üzenet itt nem szerepel a fordításban. #