HyperScript
Docs

← All of the Docs Players

Moderation

effectkick <who> [because <text>]since 1.5.7

Disconnect a player with a message

kick arg.1 because "&cPlease calm down."
Try it
effectban <who> [for <duration>] [because <text>]since 1.5.7

Ban by name, for good or for a while, and kick them if online

ban arg.1 for 7 days because "&cGriefing"
Try it
effectunban <who>since 1.5.7

Lift a ban

unban arg.1
Try it
condition<who> is banned / is not bannedsince 1.5.7

A condition

if arg.1 is not banned:
    send "&7%arg.1% is not banned."
Try it
effectrefuse login [because <text>]since 1.5.7

Inside on player login:, turn the player away

on player login:
    if {maintenance}:
        refuse login because "&eBack soon!"
Try it
Guide and examples
command /mute-kick <player>:
    permission: "staff.kick"
    trigger:
        kick arg.1 because "&cPlease calm down."

on player login:
    if {maintenance} and {%player%.staff} is not set:
        refuse login because "&eThe server is being worked on. Back soon!"
SyntaxEffect
kick <who> [because <text>]Disconnect a player with a message
ban <who> [for <duration>] [because <text>]Ban by name, for good or for a while, and kick them if online
unban <who>Lift a ban
<who> is banned / is not bannedA condition
refuse login [because <text>]Inside on player login:, turn the player away
  • ban ... for 7 days ends by itself. Without for, the ban lasts until unban.
  • Bans are the server's own (the same list /ban and /pardon use), so they work for players who are offline and survive restarts.
  • on player login: runs while someone is connecting, before they are in the game. There is no player yet, so send reaches nobody and player.name is unset; use %event.name% for their name. {%player%.<name>} does work and is the variables of whoever is logging in, which is what makes checks such as a ban of your own or a whitelist possible.