Control Module - Jail - Adds a way to jail players and temp ban 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')
-- Temp ban works the same as jail but will store the reason and move the players items to spawn
-- this is meant to be used as a more permiment jail but not as strong as a ban
Jail.temp_ban_player('MrBiter', 'Cooldude2606', 'Likes biters too much')
expcore.roles |
utils.game |
utils.global |
expcore.common |
on_player_jailed | When a player is assigned to jail |
on_player_unjailed | When a player is unassigned from jail |
on_player_temp_banned | When a player is temp banned |
on_player_untemp_banned | When a temp ban is removed from a player |
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 |
is_temp_banned(player) | Checks if a player is temp banned |
temp_ban_player(player, by_player_name[, reason='Non given.']) | Temp bans a player by moving them to jail, clearing all other roles, storing the reason, and moving their items to spawn |
untemp_ban_player(player, by_player_name) | Rrmoves a player from temp ban by clearing the stored reason, removing them from jail, and restoring previous roles |
When a player is assigned to jail
Event Parameters:When a player is unassigned from jail
Event Parameters:When a player is temp banned
Event Parameters:When a temp ban is removed from a player
Event Parameters:Checks if the player is currently in jail
Parameters:Moves a player to jail and removes all other roles
Parameters:Moves a player out of jail and restores all roles previously removed
Parameters:Checks if a player is temp banned
Parameters:Temp bans a player by moving them to jail, clearing all other roles, storing the reason, and moving their items to spawn
Parameters:Rrmoves a player from temp ban by clearing the stored reason, removing them from jail, and restoring previous roles
Parameters: