Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 184 commands...
NameBan
Syntaxban ({add}/remove) [<player>|.../addresses:<address>|.../names:<name>|...] (reason:<text>) (expire:<time>) (source:<text>)
Short DescriptionBan or un-ban players or ip addresses.
Full DescriptionAdd 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 ObjectType: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
# Use to ban a player.
- ban <[player]>
Usage Example
# Use to ban a list of players with a reason.
- ban <[player]>|<[someplayer]> "reason:Didn't grow enough potatoes."
Usage Example
# Use to ban a list of players for 10 minutes with a reason.
- ban <[player]>|<[someplayer]> "reason:Didn't grow enough potatoes." expire:10m
Usage Example
# Use to ban a player with a source.
- ban <[aplayer]> "reason:Grew too many potatoes." source:<player.name>
Usage Example
# Use to ban an ip address.
- ban addresses:127.0.0.1
Usage Example
# Use to temporarily ip ban all online players.
- ban addresses:<server.online_players.parse[ip]> expire:5m
Usage Example
# Use to unban a list of players.
- ban remove <[player]>|<[someplayer]>
Usage Example
# Use to unban an ip address.
- ban remove addresses:127.0.0.1
Groupserver
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/BanCommand.java#L31