Ban (Effect) — Skript

Addon: Skript · Category: Effect · Since: 1.4, 2.1.1 (ban reason), 2.5 (timespan), 2.9.0 (kick)

Syntax

ban [and kick] %strings/offlineplayers% [(by reason of|because [of]|on account of|due to) %-string%] [for %-timespan%]

Description

Bans or unbans a player or an IP address. If a reason is given, it will be shown to the player when they try to join the server while banned. A length of ban may also be given to apply a temporary ban. If it is absent for any reason, a permanent ban will be used instead. We recommend that you test your scripts so that no accidental permanent bans are applied.

Note that banning people does not kick them from the server. You can optionally use 'and kick' or consider using the <a href='#EffKick'>kick effect</a> after applying a ban.

Examples

unban player
ban "127.0.0.1"
IP-ban the player because "he is an idiot"
ban player due to "inappropriate language" for 2 days
ban and kick player due to "inappropriate language" for 2 days

View source