summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/EntityPlayer.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index db9b9540..1c532764 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -50,8 +50,14 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.name = s;
this.c = iteminworldmanager;
this.height = 0.0F;
+
+ // CraftBukkit start
+ this.displayName = this.name;
}
+ public String displayName;
+ // CraftBukkit end
+
public void l() {
this.activeContainer.a((ICrafting) this);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 79a15360..1b3a6222 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/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