mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-27 15:22:37 +02:00
Fix RGB support in prefixes/suffixes (#3422)
This commit is contained in:
parent
3c79e9e59d
commit
adf1273bf9
@ -358,14 +358,19 @@ public class User extends UserData implements Comparable<User>, IMessageRecipien
|
|||||||
if (ess.getSettings().addPrefixSuffix()) {
|
if (ess.getSettings().addPrefixSuffix()) {
|
||||||
//These two extra toggles are not documented, because they are mostly redundant #EasterEgg
|
//These two extra toggles are not documented, because they are mostly redundant #EasterEgg
|
||||||
if (withPrefix || !ess.getSettings().disablePrefix()) {
|
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);
|
prefix.insert(0, ptext);
|
||||||
suffix = "§r";
|
suffix = "§r";
|
||||||
}
|
}
|
||||||
if (withSuffix || !ess.getSettings().disableSuffix()) {
|
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 = 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();
|
final String strPrefix = prefix.toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user