mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
Player display name is shown in chat
This commit is contained in:
parent
8c10938f69
commit
e3e8e99fe7
2 changed files with 2 additions and 2 deletions
|
@ -432,7 +432,7 @@ implements ICommandListener {
|
|||
// CraftBukkit start
|
||||
PlayerChatEvent event = new PlayerChatEvent(Type.PLAYER_CHAT, player, s);
|
||||
server.getPluginManager().callEvent(event);
|
||||
s = (new StringBuilder()).append("<").append(event.getPlayer().getName()).append("> ").append(event.getMessage()).toString();
|
||||
s = (new StringBuilder()).append("<").append(event.getPlayer().getDisplayName()).append("> ").append(event.getMessage()).toString();
|
||||
if (event.isCancelled()) return;
|
||||
// CraftBukkit stop
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
return name;
|
||||
}
|
||||
|
||||
public void getDisplayName(final String name) {
|
||||
public void setDisplayName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue