mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
Don't override getName in CraftPlayer
This commit is contained in:
parent
416964ef5a
commit
f8e01e128b
1 changed files with 2 additions and 8 deletions
|
@ -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() + '}';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue