hasAccess
Checks if the player has access to a certain command or action.
Learn more on Roles and Permissions.
Syntax
player.hasAccess(commandOrAction);
Parameters
Name | Type | Description |
---|---|---|
commandOrAction | string | The command or action to check for. |
Returns
boolean
- Whether the player has access to the command or action.
Example
// checks for an action
player.hasAccess('+editor');
// checks for a command (without the slash)
player.hasAccess('announce');
Available on: Client Server