Everything you need to know about Minecraft commands – All the commands, what they do, and how to use them (#1)
New to commands? Or do you just not get them? This tutorial should hopefully teach you how to use commands
How all commands work: All commands begin witha forward slash (/). To type a command, you need to type it in chat. Target Selector: For closest player, do @p. For a random player, do @r. For all players @a. For self, do @s. For all entites, do @e.
Basic Commands: /tp: to use this command do /tp @p [coordinates] to teleport yourself (replace the @p for other things!)
/locate: For this one, all you need to do /locate [structure]. For example: /locate village
/kill: The famous /kill. Used in all sorts of scenarios, from running away to trolling. To use this one, just do /kill [target]. Keep in mind that a target can be @ or a [username]. E.g: /kill light452 (player’s username)
/summon: Do /summon [entity]. E.g: /summon zombie
/give: Do /give [target] [item] [amount]. If the word has a finger space, the space is replaced with an underscore, removed, or the name is changed! E.g: /give @p stone 64
Intermediate commands:
/effect: Do /effect [target] [effect] [duration in seconds] [effect level] [show particles true/false]. For example: /effect @p invisibility 100000 255 true. That example command will give you 100,000 seconds of true invisibility! (not even any bubbles!)
/setblock: do /setblock [coordinates] [block]. E.g: /setblock 100 50 100 (coordinates) stone
/weather: /weather [weather]. E.g: /weather set rain
/setworldspawn: /setworldspawn [coordinates]. E.g: /setworldspawn 145 56 964 (coordinates)
/gamemode: /gamemode [mode]. E.g: /gamemode creative
/time: /time set [time]. E.g: time set night
Other advanced command features: The tilde symbol (~) is used in many commands as a replacement for the location you want it at. Such as at /tp, doing /tp @p ~100 ~0 ~0 will teleport you 100 blocks away. The direction depends on the which of the 3 parts you wrote it in (which of the 3 tildes). In that example, it represents Z (first is X, 2nd is Y, 3rd is Z). You can also do /setblock ~~~ sand and that places a block of sand on where you are standing.
Another explanation:
A tilde (~) in a command indicates that a coordinate is relative to your own position. So ~ ~ ~ indicates your current position, and ~ ~-1 ~ indicates the block below you. Press the “T” key to open the Chat menu, and type /fill [your first coordinates] [your second coordinates].
Advanced commands:
/fill: /fill [from: coordinates] [to: coordinates]. E.g: /fill ~~~ ~100 ~40 ~0 stonebrick. That creates a 100×40 wall.
Expert commands:
/execute: /execute [target] [coordinates] [command] [Command Position if necessary] . If you want continuous ones like loads of lightning striking a player when a lever is pulled, here’s how. /execute [player name] ~~~ summon lightning_bolt. Type that in a repeat command block. Make sure that the command block: Is on repeat, is on needs redstone. Place a lever on the command block. Pull the lever. E.g: /execute @p ~~~ summon lightning_bolt