Difference between revisions of "Commands"
(Reverted removal of header links, again) |
(Updated command history) |
||
Line 383: | Line 383: | ||
* Adventure game mode | * Adventure game mode | ||
* Fill command now takes data tags | * Fill command now takes data tags | ||
+ | |- | ||
+ | ! [[Version History#1.29.1|1.29.1]] | ||
+ | | Oct 5, 2019 | ||
+ | | | ||
+ | * Fill command fill info displays width and height instead of secondary coordinates | ||
+ | * Replaced "spawn" with "summon" in the help command list | ||
+ | * Added "say" to the help command list | ||
+ | * Increased maximum command length from 256 to 1024 characters | ||
+ | * Summon command quantity is now limited to 20 mobs | ||
+ | |- | ||
+ | ! [[Version History#1.29.2|1.29.2]] | ||
+ | | Oct 20, 2019 | ||
+ | | | ||
+ | * Entering a lightning command without parameters no longer randomizes the position | ||
+ | |- | ||
+ | ! [[Version History#1.30|1.30]] | ||
+ | | Nov 13, 2020 | ||
+ | | | ||
+ | * Spectator game mode | ||
+ | * Fill command can fill a maximum of 10000 blocks instead of 9999 | ||
+ | |- | ||
+ | ! [[Version History#1.30.3b|1.30.3b]] | ||
+ | | Nov 21, 2021 | ||
+ | | | ||
+ | * Command history now goes back 100 commands instead of only 10 | ||
+ | * Home and tp commands now reset player velocity | ||
+ | |- | ||
+ | ! [[Version History#1.30.3b_1|1.30.3b_1]] | ||
+ | | Dec 5, 2021 | ||
+ | | | ||
+ | * Give command quantity is now limited to 10000 | ||
+ | * Maximum horizontal tp coordinate is now 10000 instead of 1100 | ||
+ | * (Desktop) Gamerule command now accepts the value "true" | ||
|} | |} | ||
Revision as of 08:43, 12 April 2022
Commands (also known as Cheats) are scripted codes that the player can write in the game console that change the game directly.
Using Commands
In order to use commands, the world must have cheats enabled. This option can only be enabled on the world creation screen, and cannot be enabled after a world has already been created.
The default key binding for opening the command console is "T". This can be changed in the game settings. When the console is open, the player can write a command, and execute it by pressing Enter.
The command definition includes two different types of brackets. It's important to know the difference between them.
- Parameters between the
<
and>
brackets is a list of options, separated by|
characters. For example, in/gamemode <survival|creative|adventure>
, you can write/gamemode survival
,/gamemode creative
, or/gamemode adventure
. - Parameters between the
[
and]
brackets is an optional parameter. When writing a command, you can omit the parameters. For example, in/lightning [[~]x [~]y]
, you can simply omit the X and Y parameters like so:/lightning
.
Note that [~]
is an optional modifier that can be added to coordinates, which makes it relative the player's location.
List of Commands
Command | Description | Definition | Examples |
---|---|---|---|
help |
This command is always available, even if cheats are disabled.
Lists all of the possible commands. |
/help
|
/help
|
seed |
This command is always available, even if cheats are disabled.
Shows the seed number of the current world. |
/seed
|
/seed
|
cheats |
This command will only exist if the world was created prior to 1.26.5 (when cheats were added to the game).
It allows players to permanently enable or disable cheats in their world. |
|
/cheats enable
|
clear |
Removes items from the inventory, but also returns a message if the specified item is present. |
|
|
clone |
Clones part of the world and pastes it somewhere else, with data tags for blocks. |
|
|
cls |
"cls" stands for "clear screen". This command clears console messages from the screen. | /cls
|
/cls
|
difficulty |
Sets the difficulty mode of the world. |
|
|
enchant |
Applies an enchantment to the player's equipped item. |
|
|
explode |
Creates an explosion. |
|
|
fill |
Fills a region of blocks with the specified block type |
|
|
gamemode |
Switches between the game modes. |
|
|
gamerule |
Sets global variables in the game world, such as the ability for players to keep their inventory when they die. |
|
|
give |
Gives the player any block or item. |
|
|
heal |
Instantly heals the player. | /heal
|
/heal
|
home |
Teleports to the player's spawn point. |
|
|
kill |
Instantly kills the player. | /kill
|
/kill
|
lightning |
Generates lightning |
|
|
say |
Returns the specified message in chat | /say message
|
|
setblock |
Replaces the existing block with the specified block. |
|
|
spawnskin |
Spawns in an NPC (non-player character) into the game. You need to have a skin ID for the NPC, which can be found on skin information in the skin database. |
|
|
summon |
Spawns in a mob. |
|
|
time |
Sets/shows the current time of the day, which is a value between 1 and 100. |
|
|
tp |
Teleports (TPs) the player to a specific location. |
|
|
weather |
Sets/shows whether it is raining in the world, or not. |
|
|
xp |
Sets the experience points of the player. |
|
|
History
Version | Date | Changes |
---|---|---|
1.26.5 | Jul 03, 2014 |
|
1.27 | Nov 13, 2015 |
|
1.28 | Oct 08, 2016 |
|
1.29 | Sep 27, 2019 |
|
1.29.1 | Oct 5, 2019 |
|
1.29.2 | Oct 20, 2019 |
|
1.30 | Nov 13, 2020 |
|
1.30.3b | Nov 21, 2021 |
|
1.30.3b_1 | Dec 5, 2021 |
|