Skip to content

Commit

Permalink
feat: add support for hex colour codes on spigot
Browse files Browse the repository at this point in the history
* Update Lang.java

https://www.spigotmc.org/threads/chatcolor-implementation-%C2%A7x-x.505831/

* Update Lang Files

* Add version requirement
  • Loading branch information
TreemanKing authored and sekwah41 committed Nov 18, 2024
1 parent 6386a89 commit 94522c2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static String translate(String s) {
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;
Expand Down
1 change: 1 addition & 0 deletions lang/src/main/resources/lang/de_DE.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down
1 change: 1 addition & 0 deletions lang/src/main/resources/lang/en_GB.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions lang/src/main/resources/lang/fr_FR.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 1 addition & 0 deletions lang/src/main/resources/lang/hu_HU.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down

0 comments on commit 94522c2

Please sign in to comment.