Create a new permission manager.
The server instance.
Check if a player can execute a command.
Optional
executer: PlayerThe player to check.
An object with an execute method that takes a permission string and returns whether the player can execute the command.
Get the default permissions.
The default permissions.
Get a player's permissions.
The player to get permissions for.
A promise that resolves with the player's permissions.
Check if a player is an operator.
The player to check.
Whether the player is an operator.
Set a player as an operator.
The player to set as an operator.
Whether the player should be an operator.
A promise that resolves with a boolean indicating whether the operation was successful.
Set a player's permissions.
The player to set permissions for.
Optional
permissions: string[] = []The permissions to set.
Signifies that the manager is being disabled and all permissions should be unloaded.
A promise that resolves when the manager is disabled.
Enable the manager and load all permissions.
A promise that resolves when the manager is enabled.
Permission manager.