Name | Ban |
Syntax | ban ({add}/remove) [<player>|.../addresses:<address>|.../names:<name>|...] (reason:<text>) (expire:<time>) (source:<text>) |
Short Description | Ban or un-ban players or ip addresses. |
Full Description | Add or remove player or ip address bans from the server. Banning a player will also kick them from the server.
You may specify a list of player names instead of PlayerTags, which should only ever be used for special cases (such as banning players that haven't joined the server yet). You may optionally specify both a list of players and list of addresses. Additional options are: reason: Sets the ban reason. expire: Sets the expire time of the temporary ban, as a TimeTag or a DurationTag. This will be a permanent ban if not specified. source: Sets the source of the ban. |
Related Tags | <PlayerTag.is_banned> Returns whether the player is banned.
<PlayerTag.ban_reason> Returns the reason for the player's ban, if they are banned.
<PlayerTag.ban_expiration_time> Returns the expiration of the player's ban, if they are banned. (...)
<PlayerTag.ban_created_time> Returns when the player's ban was created, if they are banned.
<PlayerTag.ban_source> Returns the source of the player's ban, if they are banned.
<server.is_banned[<address>]> Returns whether the given ip address is banned.
<server.ban_info[<address>].expiration_time> Returns the expiration of the ip address's ban, if it is banned. (...)
<server.ban_info[<address>].reason> Returns the reason for the ip address's ban, if it is banned.
<server.ban_info[<address>].created_time> Returns when the ip address's ban was created, if it is banned.
<server.ban_info[<address>].source> Returns the source of the ip address's ban, if it is banned.
<server.banned_addresses> Returns a list of all banned ip addresses.
<server.banned_players> Returns a list of all banned players.
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Usage Example |
|
Group | server |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/BanCommand.java#L31 |