mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Fix getDisplayName getting lost when getBukkitEntity is called
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
parent
55afbe647a
commit
38856db579
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue