mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 02:25:49 +01:00
feat: add support for uppercase color codes as well as &#rrggbb to lang files
This commit is contained in:
parent
ce1715436e
commit
166d48bb90
@ -64,7 +64,7 @@ public class Lang {
|
||||
}
|
||||
|
||||
public static String convertColors(String s) {
|
||||
return s.replaceAll("&([0-9a-frk-ox])", "\u00A7$1");
|
||||
return s.replaceAll("&#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])", "&x&$1&$2&$3&$4&$5&$6").replaceAll("&([0-9a-fA-Fdwrk-ox#])", "\u00A7$1");
|
||||
}
|
||||
|
||||
public static String translateInsertVariables(String s, Object... args) {
|
||||
|
@ -29,7 +29,9 @@
|
||||
# &n Underline
|
||||
# &o Italic
|
||||
# &r Reset
|
||||
# &x Hex Color (#aa5f10 represented by &x&a&a&5&f&1&0) - Spigot 1.16.1+
|
||||
#
|
||||
# &x Hex Color (#aa5f10 represented by &x&r&r&g&g&b&b) - Spigot 1.16.1+
|
||||
# &# Hex color (#aa5f10 represented by &#rrggbb) - Spigot 1.16.1+
|
||||
#
|
||||
# Some debug messages may not be listed here for translation.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user