From 8c10938f69a1ee7daddb5aaa3579b2c9e12519b1 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Fri, 7 Jan 2011 13:27:26 +0000 Subject: [PATCH] Implemented Player.getDisplayName/setDisplayName --- src/main/java/org/bukkit/craftbukkit/CraftPlayer.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftPlayer.java index 7fc7ace765..406e127a6d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftPlayer.java @@ -7,11 +7,12 @@ import org.bukkit.Location; import org.bukkit.Player; public class CraftPlayer extends CraftHumanEntity implements Player { - private EntityPlayerMP entity; + private String name; public CraftPlayer(CraftServer server, EntityPlayerMP entity) { super(server, entity); + this.name = getName(); this.entity = entity; } @@ -47,6 +48,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { entity.a.a(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); } + public String getDisplayName() { + return name; + } + + public void getDisplayName(final String name) { + this.name = name; + } + @Override public String toString() { return "CraftPlayer{" + "name=" + getName() + '}';