The Permission command manages the permissions that players have of their own, on top of what their role allows. Every subcommand needs the permission permission. /permission grant <target> <permission> [duration] allows a permission for the targeted players whatever their role says: it sets the permission to PERM_ALLOW, as the Allow button of the permission editor does. /permission revoke <target> <permission> [duration] denies it the same way with PERM_NEVER, as the Revoke button does. With a duration the permission is set temporarily. /permission reset <target> <permission> removes what was set for the targeted players, for good or temporarily, so that their role decides again: it sets the permission to PERM_NO, as the middle button does. /permission list <target> tells the caller the role of a player, the permissions set for them individually and those that their loaded character decides.

A permission is named by its ID or by the ID or an alias of the command it belongs to, exactly but in any case.

Summary

Subcommands

Allows the permission for the targeted players.
Sends the caller the role of the targeted player and the permissions set for that player individually, as one notification per kind of permission, and one for every temporary permission with the time it has left.
Resets the permission of the targeted players and notifies them and staff.
Denies the permission to the targeted players.

Subcommands

grant:on_run(actor, targets, permission_id, ...)

shared plugins/admin/plugin/commands/sh_permission.lua:90

Allows the permission for the targeted players.

Parameters

  • actor Player the caller, or an invalid entity when run from the server console
  • targets List<Player> players to grant the permission to
  • permission_id String permission ID, command ID or command alias
  • ... Vararg words of an optional duration as read by Bolt:interpret_ban_time, e.g. '2 hours'; the permission is granted for good without one

list:on_run(actor, targets)

shared plugins/admin/plugin/commands/sh_permission.lua:178

Sends the caller the role of the targeted player and the permissions set for that player individually, as one notification per kind of permission, and one for every temporary permission with the time it has left. The permissions that the loaded character of the player decides, see Bolt:get_permission_layer, are listed as well. Only the first of several targeted players is listed.

Parameters

  • actor Player the caller, or an invalid entity when run from the server console
  • targets List<Player> targeted players; only the first one is used

reset:on_run(actor, targets, permission_id)

shared plugins/admin/plugin/commands/sh_permission.lua:133

Resets the permission of the targeted players and notifies them and staff. An ID that is not registered on the server is accepted as well if one of the targets has a value set for it, which is the case for the permissions that only exist on the client, such as 'admin_esp', once they were set in the permission editor.

Parameters

  • actor Player the caller, or an invalid entity when run from the server console
  • targets List<Player> players whose permission is reset
  • permission_id String permission ID, command ID or command alias

revoke:on_run(actor, targets, permission_id, ...)

shared plugins/admin/plugin/commands/sh_permission.lua:107

Denies the permission to the targeted players.

Parameters

  • actor Player the caller, or an invalid entity when run from the server console
  • targets List<Player> players to deny the permission to
  • permission_id String permission ID, command ID or command alias
  • ... Vararg words of an optional duration as read by Bolt:interpret_ban_time, e.g. '2 hours'; the permission is denied for good without one

Defined in