Kick a player
/kick SteveSteve is disconnected with the message Kicked by an operator.

/kick disconnects one or more players and can show them a reason. Unlike a ban, the player can reconnect at once, so it works as a warning. It is mostly used on dedicated servers, from the console or by an operator, but it also works in a LAN world.
/kick <targets> [<reason>]// In single player with cheats on, you have level 4, so it works there too.
| Argument | Expects | What it does |
|---|---|---|
| targets | Player selectorone or several | Online player name or selector, such as Steve or @a[name=!Steve]; offline players cannot be kicked. |
| reasonoptional | Message | Optional text that replaces Kicked by an operator on the player's screen. |
/kick SteveSteve is disconnected with the message Kicked by an operator.
/kick Steve Read the rules at spawnSteve sees your reason on the disconnect screen and can rejoin.
/kick @a[name=!Steve] Server maintenanceDisconnects all online players except Steve, for example before maintenance.
Fill in the fields, then copy the command.
Command generatorWithout a reason, the screen says Kicked by an operator. With a reason, your text replaces it, so keep it short and clear. The kick is not saved anywhere and the player can rejoin right away. To keep someone out, use /ban; to block everyone who is not invited, turn on the /whitelist.
Targets must be online, otherwise you get No player was found. Selectors work, but be careful with @a: it includes you when you type it in the chat. Exclude yourself with @a[name=!YourName]. In a LAN world, the host cannot be kicked (Cannot kick the server owner in a LAN game), and in a singleplayer world that is not open to LAN the command has nobody to kick.
Check exact names first with /list. Before maintenance, warn players with /say, then kick everyone except the staff. To disconnect players who stay away from the keyboard automatically, set a limit with /setidletimeout.
✓ Checked in Java Edition 26.3 · updated 2 November 2026
Yes, immediately. A kick is not saved anywhere; use /ban to keep someone out.
Use a selector that excludes your name, for example /kick @a[name=!Steve] Server maintenance.
In single player with cheats on, or on a server as an operator or from the server console: /kick <targets> [<reason>].
Server operator, level 3. In single player with cheats on, you have level 4, so it works there too.