Fix broken add-prefix-in-playerlist behavior

This commit is contained in:
Maxetto 2017-01-04 11:47:12 -05:00 committed by vemacs
parent 5f83766dc1
commit 198d852995

View File

@ -306,12 +306,12 @@ 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()) {
if (withPrefix && !ess.getSettings().disablePrefix()) {
final String ptext = ess.getPermissionsHandler().getPrefix(base).replace('&', '§');
prefix.insert(0, ptext);
suffix = "§r";
}
if (withSuffix || !ess.getSettings().disableSuffix()) {
if (withSuffix && !ess.getSettings().disableSuffix()) {
final String stext = ess.getPermissionsHandler().getSuffix(base).replace('&', '§');
suffix = stext + "§r";
suffix = suffix.replace("§f§f", "§f").replace("§f§r", "§r").replace("§r§r", "§r");