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

Don't override getName in CraftPlayer

Dieser Commit ist enthalten in:
Dinnerbone 2010-12-30 04:39:28 +00:00
Ursprung 416964ef5a
Commit f8e01e128b

Datei anzeigen

@ -6,20 +6,14 @@ import org.bukkit.Player;
public class CraftPlayer extends CraftHumanEntity implements Player { public class CraftPlayer extends CraftHumanEntity implements Player {
private final EntityPlayerMP entity; private final EntityPlayerMP entity;
private final String name;
public CraftPlayer(CraftServer server, EntityPlayerMP entity) { public CraftPlayer(CraftServer server, EntityPlayerMP entity) {
super(server, entity); super(server, entity);
this.entity = entity; this.entity = entity;
name = entity.aw;
}
public String getName() {
return name;
} }
public boolean isOnline() { public boolean isOnline() {
return server.getHandle().g(name); return server.getHandle().g(getName());
} }
@Override @Override
@ -29,6 +23,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public String toString() { public String toString() {
return "CraftPlayer{" + "name=" + name + '}'; return "CraftPlayer{" + "name=" + getName() + '}';
} }
} }