mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Merge pull request #284 from phrstbrn/chat-braces-fix
Prevent replacement of { and } characters in chat.format
This commit is contained in:
commit
20786654a4
1 changed files with 2 additions and 1 deletions
|
@ -415,7 +415,8 @@ public class Settings implements ISettings
|
||||||
format = format.replace("{MESSAGE}", "%2$s");
|
format = format.replace("{MESSAGE}", "%2$s");
|
||||||
format = format.replace("{WORLDNAME}", "{1}");
|
format = format.replace("{WORLDNAME}", "{1}");
|
||||||
format = format.replace("{SHORTWORLDNAME}", "{2}");
|
format = format.replace("{SHORTWORLDNAME}", "{2}");
|
||||||
format = format.replaceAll("\\{(\\D*?)\\}", "\\[$1\\]");
|
format = format.replaceAll("'", "''");
|
||||||
|
format = format.replaceAll("\\{(\\D*?)\\}", "\\'{$1\\}'");
|
||||||
format = "§r".concat(format);
|
format = "§r".concat(format);
|
||||||
mFormat = new MessageFormat(format);
|
mFormat = new MessageFormat(format);
|
||||||
chatFormats.put(group, mFormat);
|
chatFormats.put(group, mFormat);
|
||||||
|
|
Loading…
Reference in a new issue