mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-01 14:38:48 +00:00
Fix nicknames not setting properly
This commit is contained in:
1 parent
9d29b53907
commit
2e40333023
1 file changed
+4
-7
+4
-7
@@ -143,13 +143,11 @@ public class BukkitPlayerUser implements PlayerUser, ForwardingAudience.Single {
|
||||
|
||||
@Override
|
||||
public void nickname(@Nullable String newNickname, final boolean fromRemote) {
|
||||
this.nickname = newNickname;
|
||||
|
||||
final OfflinePlayer player = Bukkit.getOfflinePlayer(this.uuid());
|
||||
|
||||
if (player.isOnline()) {
|
||||
if (newNickname != null) {
|
||||
final Component component = this.carbonChat.messageProcessor().processMessage(this.nickname);
|
||||
final Component component = this.carbonChat.messageProcessor().processMessage(newNickname);
|
||||
newNickname = CarbonChatBukkit.LEGACY.serialize(component);
|
||||
}
|
||||
|
||||
@@ -157,13 +155,12 @@ public class BukkitPlayerUser implements PlayerUser, ForwardingAudience.Single {
|
||||
|
||||
if (onlinePlayer != null) {
|
||||
onlinePlayer.setDisplayName(newNickname);
|
||||
onlinePlayer.setPlayerListName(newNickname);
|
||||
}
|
||||
|
||||
// if (this.carbonChat.getConfig().getBoolean("nicknames-set-tab-name")) {
|
||||
// onlinePlayer.setPlayerListName(newNickname);
|
||||
// }
|
||||
}
|
||||
|
||||
this.nickname = newNickname;
|
||||
|
||||
if (!fromRemote) {
|
||||
final String nick = this.nickname;
|
||||
|
||||
|
||||
Reference in new issue
Block a user