mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Added a display name to Actors
This commit is contained in:
@ -38,6 +38,15 @@ public interface Actor extends Identifiable, SessionOwner, Subject {
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Gets the display name of the actor. This can be a nickname, and is not guaranteed to be unique.
|
||||
*
|
||||
* @return The display name
|
||||
*/
|
||||
default String getDisplayName() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a message.
|
||||
*
|
||||
|
@ -82,6 +82,11 @@ class PlayerProxy extends AbstractPlayerActor {
|
||||
return basePlayer.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return basePlayer.getDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseEntity getState() {
|
||||
throw new UnsupportedOperationException("Can't getState() on a player");
|
||||
|
Reference in New Issue
Block a user