Don't override getName in CraftPlayer

By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
CraftBukkit/Spigot 2010-12-30 04:39:28 +00:00
parent 10d1ac6c12
commit 827ed5aa40

View File

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