From 38856db57906279c0b513543bb306441793bc9ca Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sun, 13 Mar 2011 12:52:01 +0100 Subject: [PATCH] Fix getDisplayName getting lost when getBukkitEntity is called By: Erik Broes --- .../java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 79a153600c..1b3a6222c2 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -17,11 +17,9 @@ import org.bukkit.craftbukkit.TextWrapper; import org.bukkit.entity.Player; public class CraftPlayer extends CraftHumanEntity implements Player { - private String name; public CraftPlayer(CraftServer server, EntityPlayer entity) { super(server, entity); - name = getName(); } public boolean isOp() { @@ -88,11 +86,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public String getDisplayName() { - return name; + return getHandle().displayName; } public void setDisplayName(final String name) { - this.name = name; + getHandle().displayName = name; } @Override