Control Module - Jail - Adds a way to jail players.
-- import the module from the control modules
local Jail = require 'modules.control.jail' --- @dep modules.control.jail
-- This will move 'MrBiter' to the jail role and remove all other roles from them
-- the player name and reason are only so they can be included in the event for user feedback
Jail.jail_player('MrBiter', 'Cooldude2606', 'Likes biters too much')
-- This will give 'MrBiter' all his roles back and remove him from jail
-- again as above the player name is only used in the event for user feedback
Jail.unjail_player('MrBiter', 'Cooldude2606')
expcore.roles |
utils.game |
on_player_jailed | When a player is assigned to jail |
on_player_unjailed | When a player is unassigned from jail |
is_jailed(player) | Checks if the player is currently in jail |
jail_player(player, by_player_name[, reason='Non given.']) | Moves a player to jail and removes all other roles |
unjail_player(player, by_player_name) | Moves a player out of jail and restores all roles previously removed |
When a player is assigned to jail
Event Parameters:When a player is unassigned from jail
Event Parameters:Checks if the player is currently in jail
Parameters:Moves a player to jail and removes all other roles
Parameters: