mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 11:49:12 +00:00
Fix RGB support in prefixes/suffixes (#3422)
This commit is contained in:
parent
3c79e9e59d
commit
adf1273bf9
1 changed files with 8 additions and 3 deletions
|
@ -358,14 +358,19 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
|
|||
if (ess.getSettings().addPrefixSuffix()) {
|
||||
//These two extra toggles are not documented, because they are mostly redundant #EasterEgg
|
||||
if (withPrefix || !ess.getSettings().disablePrefix()) {
|
||||
final String ptext = ess.getPermissionsHandler().getPrefix(base).replace('&', '§');
|
||||
final String ptext = FormatUtil.replaceFormat(ess.getPermissionsHandler().getPrefix(base));
|
||||
prefix.insert(0, ptext);
|
||||
suffix = "§r";
|
||||
}
|
||||
if (withSuffix || !ess.getSettings().disableSuffix()) {
|
||||
final String stext = ess.getPermissionsHandler().getSuffix(base).replace('&', '§');
|
||||
final String stext = FormatUtil.replaceFormat(ess.getPermissionsHandler().getSuffix(base));
|
||||
suffix = stext + "§r";
|
||||
suffix = suffix.replace("§f§f", "§f").replace("§f§r", "§r").replace("§r§r", "§r");
|
||||
// :YEP: WHAT ARE THEY DOING?
|
||||
// :YEP: STILL. LEGACY CODE.
|
||||
// :YEP: BUT WHY?
|
||||
// :YEP: I CAN'T BELIEVE THIS!
|
||||
// Code from 1542 BC #EasterEgg
|
||||
suffix = suffix.replace("§f§r", "§r").replace("§r§r", "§r");
|
||||
}
|
||||
}
|
||||
final String strPrefix = prefix.toString();
|
||||
|
|
Loading…
Reference in a new issue