mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
Added Player.get/setListName to change the name of the player on the player list.
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
parent
b7fd3933e4
commit
9d39647939
1 changed files with 8 additions and 0 deletions
|
@ -124,6 +124,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
getHandle().displayName = name;
|
||||
}
|
||||
|
||||
public String getListName() {
|
||||
return getHandle().listName;
|
||||
}
|
||||
|
||||
public void setListName(String name) {
|
||||
server.getHandle().changeListName(getHandle(), name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftPlayer{" + "name=" + getName() + '}';
|
||||
|
|
Loading…
Reference in a new issue