mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-24 06:23:59 +00:00
Fix long prefix breaking setPlayerListName(), because they are too long.
If Essentials detects, that the player name would be too long with prefix and suffix to fit in the player list, it will only update the name without prefix and suffix but with nickname and opcolor.
This commit is contained in:
parent
6633b39954
commit
14cc499421
4 changed files with 18 additions and 13 deletions
|
@ -61,8 +61,8 @@ public class Commandnick extends EssentialsCommand
|
|||
}
|
||||
else if ("off".equalsIgnoreCase(nick) || target.getName().equalsIgnoreCase(nick))
|
||||
{
|
||||
target.setDisplayNick(target.getName());
|
||||
target.setNickname(null);
|
||||
target.setDisplayNick();
|
||||
target.sendMessage(Util.i18n("nickNoMore"));
|
||||
}
|
||||
else
|
||||
|
@ -83,8 +83,8 @@ public class Commandnick extends EssentialsCommand
|
|||
}
|
||||
}
|
||||
|
||||
target.setDisplayNick(ess.getSettings().getNicknamePrefix() + formattedNick);
|
||||
target.setNickname(formattedNick);
|
||||
target.setDisplayNick();
|
||||
target.sendMessage(Util.format("nickSet", target.getDisplayName() + "§7."));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue