From e3e8e99fe746828568b1ddd2f15c975645cc14e8 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Fri, 7 Jan 2011 13:28:23 +0000 Subject: [PATCH] Player display name is shown in chat --- src/main/java/net/minecraft/server/NetServerHandler.java | 2 +- src/main/java/org/bukkit/craftbukkit/CraftPlayer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index ebf2d34d2c..0f20fc1c32 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftPlayer.java index 406e127a6d..e3b093d221 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftPlayer.java @@ -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; }