3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

Implemented Player.getDisplayName/setDisplayName

Dieser Commit ist enthalten in:
Dinnerbone 2011-01-07 13:27:26 +00:00
Ursprung 96afc38224
Commit 8c10938f69

Datei anzeigen

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