Interface Actor
public interface Actor
An actor is a further abstraction of a User from within OpenAudioMc.
A user is an object representing a platform specific user whose type is given as a parameter to the user class itself.
An actor is a more abstract version of this, and is used to represent any user, regardless of platform.
-
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of the actor (usually the player name)Get the unique id of the actor (usually the player uuid)booleanhasPermission(String permissionNode) Check if the actor has a certain permission node.booleanIf the actor is an administrator (usually a player with OP if we're running on a spigot host, otherwise determined by the platform)voidsendMessage(String message) Make the actor execute a command.
-
Method Details
-
getName
String getName()Get the name of the actor (usually the player name)- Returns:
- the name of the actor
-
getUniqueId
UUID getUniqueId()Get the unique id of the actor (usually the player uuid)- Returns:
- the unique id of the actor
-
isAdministrator
boolean isAdministrator()If the actor is an administrator (usually a player with OP if we're running on a spigot host, otherwise determined by the platform)- Returns:
- if the actor is an administrator
-
hasPermission
Check if the actor has a certain permission node. This uses the underlying platform's permission system if available.- Parameters:
permissionNode- the permission node to check for- Returns:
- if the actor has the permission node
-
sendMessage
Make the actor execute a command. This is usually a wrapper around the platform's command sender system.
-