A row of the permission editor: the name of a permission, the allow, not set and never buttons that set its value for the edited player or their character, and what the player may do now together with the layer that decides it. Right-clicking a button makes that value temporary.
Summary
Methods
Methods
Returns the button that stands for a permission value.
Parameters
- perm Number PERM_ value; anything but PERM_ALLOW and PERM_NEVER gives the 'not set' button
Returns
- Panel
Returns the permission this row stands for.
Returns
- Map permission data
Returns the player whose permission this row edits.
Returns
- Player the player, or nil if none has been set
Returns the currently selected permission value.
Returns
- Number PERM_ALLOW
- PERM_NO or PERM_NEVER
Lays the row out for its current size: the title, a column for each button and the label of the deciding layer, so that the row follows the width of the list it sits in.
Parameters
- w Number panel width
- h Number panel height
Recreates the row: the permission's title, the allow / not set / never buttons and the
label of the deciding layer. The name and the description of the permission are
translated if they are language phrases. Right-clicking the allow or never button asks for
a duration and makes that value temporary; right-clicking the not set button takes the
temporary value away. A duration that cannot be read is reported to the local player. The
children are positioned by PerformLayout, so the row may be resized afterwards.
Marks a button as the selected value and, if that differs from the current value of the edited layer (the player's own permission or their character's), sends the change to the server.
Parameters
- button Panel one of the row's value buttons
Sets which layer of the player's permissions this row edits.
Parameters
- layer String 'user' for the player's own permissions, 'character' for those of their active character
Sets the permission this row stands for and rebuilds the row.
Parameters
- perm Map optional, defaults to
{}permission data as stored by Bolt:add_permission
Sets the player whose permission this row edits.
Parameters
- target Player
Marks the button for a permission value as temporary and shows the remaining time in its tooltip. The previously marked button is cleared.
Parameters
- perm Number PERM_ value
- expires Number unix timestamp at which it expires, 0 to clear the mark
Selects the button for a permission value, exactly as if it had been clicked.
Parameters
- perm Number PERM_ value
Shows what the edited player may do now and which layer decides it, in green when the permission is allowed and in red when it is not. The editor calls it whenever the permissions of the player change; values that were just set show once the server has sent them back.