Once you have a command block, you can apply basic commands in Minecraft with little trouble. Basic commands require only a few words and numbers. Command blocks support the following basic commands.
defaultgamemode <mode>
Specifies the game mode for new players entering the world. For <mode>, you can enter survival, creative, adventure, or spectator or the numbers 0, 1, 2, or 3, respectively.
difficulty <new difficulty>
Sets the difficulty level of the game. For <new difficulty>, you can enter peaceful, easy, normal, or hard or the numbers 0, 1, 2, or 3, respectively. This strategy works even if the world’s difficulty is locked (preventing players without cheats from changing it), so keep this command block away from the wrong hands.
gamemode <mode> <player>
Changes the game mode of the target player. For <mode>, you can enter survival, creative, adventure, or spectator or the numbers 0, 1, 2, or 3, respectively.
kill <target>
Instantly kills whoever the target is. You can enter a username for <target> to kill a specific player’s avatar or use special arguments.
me <action>
Displays a third-person statement in the chat. If you enter /me is building a house, the chat would say * Isometrus is building a house. The command block’s name is @ by default, making this command produce weird messages, such as * @ says hi; however, you can use the anvil block to rename the command block, allowing it to produce messages like * The Great Command Block says hi.
say <message>
Just like the me command, except that it’s formatted more like a normal chat message. When activated, it prints [<command block name>] <message>.
seed
The number from which the world is derived — in other words, two worlds with the same seed are created the same way. When this command is run from a command block, the seed of the world is outputted in the Previous Output box of the command block interface.
tell <player> <private message …>
Produces a message in chat that only certain players can see. The target receives the message <command block name> whispers to you: <private message >. You can also use msg or w as alternatives to tell.
tellraw <player> <raw json message>
Lets you send more-intricate text messages to the target player(s). However, the message must be in JavaScript Object Notation (JSON) format, which can be complicated to use. Fortunately, websites such as Ezekielelin.com allow you to produce these messages with a buttons-and-menus interface.
time <set|add> <value>
The time of day, represented by a number between 0 and 24000. This number constantly increases, but when it reaches 24000, it cycles back to 0 again because a full day and night have passed. This means that the daytime begins at 0 and nighttime begins at 12000. This command lets you manipulate this number.
The first parameter can be set or add, which determines whether you’re setting the time to a certain value or adding a number to its current position. <value> is the number in question.
title <player> <title|subtitle> <raw json title>
Displays a large string of text in the middle of the target player’s screen. The text fades in, lingers, and then fades out. If the second parameter is title, the text is immediately displayed in this way. If the second parameter is subtitle, text is displayed as a subtitle under subsequent titles. The text itself is the final parameter, and it can be either simple text or in JSON format.
title <player> times <fadeIn> <stay> <fadeOut>
A different application of the earlier title command; defines for the target player some individual settings that modify how titles are displayed. The last three parameters are all numbers representing how long the title should take to appear, how long it should stay, and how long it should take to disappear. The numbers are measured in ticks, or 20ths of a second.
title <player> <clear|reset>
Another application of the earlier title command. If the second parameter is clear, the title displayed to the target player is removed instantly. If the second parameter is reset, all of the player’s title settings (including subtitles) are returned to their defaults.
toggledownfall
Alters the weather. If it’s raining, the rain stops — otherwise, it begins raining.
weather <clear|rain|thunder> [duration in seconds]
Changes the weather. You can produce clear weather, rain, or a storm by setting the first parameter to clear, rain, or thunder, respectively. You can also include a number at the end of the command to specify the duration of the weather in seconds.
xp <amount> <player>
Gives experience points to the target player; <amount> is the number of points given. However, you can also write a capital L at the end of this number to grant levels instead of points. For example, xp 100L Isometrus gives the player 100 extra experience levels.