13
0
geforkt von Mirrors/Paper

Fix getDisplayName getting lost when getBukkitEntity is called

By: Erik Broes <erikbroes@grum.nl>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2011-03-13 12:52:01 +01:00
Ursprung 55afbe647a
Commit 38856db579

Datei anzeigen

@ -17,11 +17,9 @@ import org.bukkit.craftbukkit.TextWrapper;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
public class CraftPlayer extends CraftHumanEntity implements Player { public class CraftPlayer extends CraftHumanEntity implements Player {
private String name;
public CraftPlayer(CraftServer server, EntityPlayer entity) { public CraftPlayer(CraftServer server, EntityPlayer entity) {
super(server, entity); super(server, entity);
name = getName();
} }
public boolean isOp() { public boolean isOp() {
@ -88,11 +86,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public String getDisplayName() { public String getDisplayName() {
return name; return getHandle().displayName;
} }
public void setDisplayName(final String name) { public void setDisplayName(final String name) {
this.name = name; getHandle().displayName = name;
} }
@Override @Override