Difference between revisions of "Commands"
(Some better "See Also" references) |
(Put history into a table, removed table of contents) |
||
Line 1: | Line 1: | ||
+ | __NOTOC__ | ||
+ | |||
Commands (also known as Cheats) are scripted codes that the player can write in the game console that change the game directly. | Commands (also known as Cheats) are scripted codes that the player can write in the game console that change the game directly. | ||
Line 40: | Line 42: | ||
| | | | ||
− | |||
− | |||
|----------------------------------------------------------------------------------------------------------- | |----------------------------------------------------------------------------------------------------------- | ||
Line 52: | Line 52: | ||
<code>/cheats <enable|disable></code> | <code>/cheats <enable|disable></code> | ||
| | | | ||
− | |||
− | |||
− | |||
|----------------------------------------------------------------------------------------------------------- | |----------------------------------------------------------------------------------------------------------- | ||
Line 211: | Line 208: | ||
| | | | ||
* <code>/spawnskin 58300</code> | * <code>/spawnskin 58300</code> | ||
− | *: Spawns 1 of [ | + | *: Spawns 1 of [//mineblocks.com/1/skin/58300 Zanzlanz's Squid skin]. |
* <code>/spawnskin 58300 5</code> | * <code>/spawnskin 58300 5</code> | ||
*: Spawns 5 of them. | *: Spawns 5 of them. | ||
Line 274: | Line 271: | ||
==History== | ==History== | ||
− | + | {|class="wikitable" | |
− | + | !Version | |
− | : Added commands: '''cheats, explode, fill, gamemode, gamerule, give, help, home, kill, seed, time, weather, xp''' | + | !Date |
− | + | !Changes | |
− | + | |- | |
− | + | ![[Version History#1.26.5|1.26.5]] | |
− | + | ! Jul 03, 2014 | |
− | + | | | |
− | + | * Commands were first introduced | |
− | + | :* Added commands: '''cheats, explode, fill, gamemode, gamerule, give, help, home, kill, seed, time, weather, xp''' | |
− | + | |- | |
− | + | ![[Version History#1.27|1.27]] | |
− | + | ! Nov 13, 2015 | |
+ | | | ||
+ | * Default keybinding to open commands changed from "/" to "T" | ||
+ | * Added commands: '''heal, spawnskin, tp''' | ||
+ | * Added a doFireTick game rule | ||
+ | * Added "L" modifier to xp | ||
+ | * Added oldBlockHandling to fill | ||
+ | |- | ||
+ | ![[Version History#1.28|1.28]] | ||
+ | ! Oct 08, 2016 | ||
+ | | | ||
+ | * Added commands: '''difficulty, enchant, lightning''' | ||
+ | * Added a passiveMobs game rule | ||
+ | * Added durability and data_tags to give | ||
+ | |} | ||
− | ==See Also== | + | == See Also == |
*[[Identifiers]] | *[[Identifiers]] | ||
*[[Data tags]] | *[[Data tags]] |
Revision as of 19:54, 2 March 2019
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>
, you can either write/gamemode survival
, or/gamemode creative
. - 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. |
|
|
seed |
This command is always available, even if cheats are disabled.
Shows the seed number of the current world. |
|
|
cheats |
This command will only exist if the world was created prior to cheats being added to the game.
It allows players to permanently enable or disable cheats in their world. |
|
|
difficulty |
Sets the difficulty mode of the world. |
|
|
enchant |
Applies and 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. |
| |
home |
Teleports to the player's spawn point. |
|
|
kill |
Instantly kills the player. |
|
|
lightning |
Generates lightning |
|
|
spawnskin |
Spawns in a NPC (Non-player control)into the game. You need to have a skin ID for the NPC, which can be found on skin stats in the gallery. |
|
|
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 |
|