
Command
/kick
Disconnects players from the server, with an optional reason shown to them.
| /kick <targets> [<reason>] |
| Argument | Kind of value | What to type |
|---|---|---|
| <targets> | Target selector | The players to kick, as a name or a target selector. One or more players. |
| <reason> | Message | The message shown to the kicked players. Everything after the targets is used as the reason. Optional. |
| Permission level | 3: server operators with level 3 or higher |
| Works in | Operators with level 3 or higher on multiplayer servers, the server console, and the owner of a singleplayer world with cheats enabled. Command blocks and functions cannot run it, because they only have level 2. It works on multiplayer servers and in worlds opened to LAN, but not in a singleplayer world that is not open to others. |
| Result | Reports "Kicked <player>: <reason>" for each player. The number /execute store saves is the number of players kicked. |
| Reason | Without a reason, the kicked player sees the standard kick message of the game. |
| Singleplayer | In a singleplayer world that is not opened to LAN the command fails with "Cannot kick in an offline singleplayer game". |
| World owner | The owner of a world opened to LAN cannot be kicked. If nobody else was kicked, the command fails with "Cannot kick the server owner in a LAN game". |
| No ban | A kicked player can join again right away. |
/kick AlexDisconnects the player Alex with the standard message.
/kick Alex Please follow the server rulesDisconnects Alex and shows the given reason.

