The CharPermission command manages the permissions of the characters that players have loaded. While a character is loaded, its permissions apply together with those of its player, before the player's role, see Bolt:get_permission_layer; the player's other characters do not have them. Every subcommand needs the charpermission permission and works on the active character of each targeted player. /charpermission grant <target> <permission> [duration] allows a permission for the character whatever the player's role says, unless the player is denied it: it sets the permission to PERM_ALLOW. /charpermission revoke <target> <permission> [duration] denies it to the character whatever the player and their role say, with PERM_NEVER. With a duration the permission is set temporarily, for at most Bolt.max_temp_duration. /charpermission reset <target> <permission> removes what was set for the character, for good or temporarily, so that the player's own permissions and role decide again. /charpermission list <target> tells the caller the permissions set for the character.

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 active characters of the targeted players.
Sends the caller the permissions set for the active character of the targeted player, as one notification per kind of permission, and one for every temporary permission with the time it has left.
Resets the permission of the active characters of the targeted players and notifies them and staff.
Denies the permission to the active characters of the targeted players.

Subcommands

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

shared plugins/admin/plugin/commands/sh_charpermission.lua:121

Allows the permission for the active characters of the targeted players.

Parameters

  • actor Player the caller, or an invalid entity when run from the server console
  • targets List<Player> players whose characters get the permission
  • 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_charpermission.lua:204

Sends the caller the permissions set for the active character of the targeted player, as one notification per kind of permission, and one for every temporary permission with the time it has left. 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_charpermission.lua:155

Resets the permission of the active characters 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 characters has a value set for it.

Parameters

  • actor Player the caller, or an invalid entity when run from the server console
  • targets List<Player> players whose characters' 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_charpermission.lua:138

Denies the permission to the active characters of the targeted players.

Parameters

  • actor Player the caller, or an invalid entity when run from the server console
  • targets List<Player> players whose characters are denied the permission
  • 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