/kick
< Commands
/kick| Permission level required |
|
|---|---|
| Restrictions |
No command blocks |
{
"title": "<code>/kick</code>",
"rows": [
{
"field": "\n* 3 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup>\n* 1 <sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Bedrock Edition\">(link to Bedrock Edition article, displayed as BE) only</span></i>]</sup>",
"label": "(link to Permission level article, displayed as Permission level<br>required)"
},
{
"field": "No (link to command blocks article, displayed as command blocks)<sup class=\"noprint nowrap Inline-Template \" title=\"\">[<i><span title=\"This statement only applies to Java Edition\">(link to Java Edition article, displayed as JE) only</span></i>]</sup>",
"label": "(link to Commands#Restrictions article, displayed as Restrictions)"
}
],
"invimages": [],
"images": []
}
Kicks a player off the server, and displays an optional reason to it.
The player in a single player world or the host of a world cannot be kicked.
Syntax
- Java Edition
kick <targets> [<reason>]
- Bedrock Edition
kick <name: target> [reason: message]
Arguments
JE: <targets>: entity
BE: name: target: CommandSelector<Player>
- Specifies the player(s) to be kicked. Only 1 player to be kicked.
- Must be a player name, a target selector or a UUID. And the target selector must/should be of player type. In Bedrock Edition, the target selector should be of player type.
- In Bedrock Edition, it can also be an XUID (Xbox UID) of a player.
JE: <reason>: message
BE: reason: message: CommandMessage
- Message to display to the kicked player. In Java Edition, if unspecified, defaults to
Kicked by an operator. - It is a greedy phrase string argument (taking the rest of the command as the string argument). Can include spaces as well as target selectors. The game replaces entity selectors in the message with the list of selected entities' names, which is formatted as "name1 and name2" for two entities, or "name1, name2, ... and namen" for n entities. In Bedrock Edition,
@<player name>can be used to mention a player;@herecan be used to mention all players.
Result
| Command | Trigger | Java Edition | Bedrock Edition |
|---|---|---|---|
| Any | The command is incomplete, or any argument is not specified correctly. | Unparseable | Unparseable |
name: target is a target selector that is not in player type. | N/A | Failed | |
<targets> or player: target fails to resolve to one or more online players. | Failed | ||
| Only one player is selected, and the player is the host of the world. | |||
| Otherwise | Successful | ||
Output
| Command | Edition | Situation | Success Count | /execute store success ... | /execute store result ... |
|---|---|---|---|---|---|
| Any | Java Edition | On fail | N/A | 0 | 0 |
| On success | N/A | 1 | the number of targeted players | ||
| Bedrock Edition | On fail | 0 | N/A | N/A | |
| On success | 1 | N/A | N/A |
History
| Java Edition Classic | |||||||
|---|---|---|---|---|---|---|---|
| 0.0.16a | Added /kick. | ||||||
| Java Edition Indev | |||||||
| 0.31 | Due to Indev's lack of support for servers, commands are no longer usable. | ||||||
| Java Edition Alpha | |||||||
| v1.0.16 | /kick is now usable again. | ||||||
| Java Edition | |||||||
| 1.20.3 | 23w40a | The /kick no longer kicks the player in a single player world or the host in a LAN world. | |||||
| Bedrock Edition | |||||||
| 1.16.0 | beta 1.16.0.57 | Added /kick. | |||||