Archiviert
13
0

Fix getDisplayName getting lost when getBukkitEntity is called

Dieser Commit ist enthalten in:
Erik Broes 2011-03-13 12:52:01 +01:00
Ursprung 1be1b5ab4d
Commit 6043797ce0
2 geänderte Dateien mit 8 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -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);
}

Datei anzeigen

@ -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