Using Commands in Minecraft

Commands can help you to interact with your game in ways that you can't while playing normally that might entirely change the gameplay experience. This article will provide a list of some of the most useful and commonly used commands, what to type to use the command, and a brief explanation of what each command does. For an exhaustive list of all commands, click here to view the official wiki.

Minecraft has a lot of commands, so this list will only include the most useful ones. Some of these commands can be used by any player while others require you to have admin or OP status on the server.


When to use a slash in commands.

While playing in-game, you can open chat and send messages to people in the server playing with you. To tell the server that you want to send a command instead of chatting, you have to put a slash in front of the text. For example, if you sent the message "gamemode", it would just say the word. But if you send "/gamemode", the server knows you want to send a command.

In the server console, outside of the game, sending messages in the console automatically sends them as commands. If you put a slash in front of console commands, they won't send and you will get an error.


Help with command syntax

Commands can have multiple parts. Make sure to enter each part correctly to send the command without error. The official Minecraft wiki has a brief explanation on syntax. Here are some examples to make it easier to understand:

/tell coolplayer123 give me all your diamonds

In this case, we have to tell the command which player we want to send our message to and then our message text.

/difficulty <peaceful | easy | normal | hard>
/difficulty hard

For this command, we tell the server that we want the game's difficulty to be hard out of the 4 options possible.

Player Commands

Player CommandDescription
/me Displays a message that the player is performing.
/listList all players currently on the server.
/w Sends the target player a direct message. /msg and /tell are aliases for /w.
/tm or /teammsg
/seedDisplays the world seed. You can change your seed with our guide.

OP Commands

Admin CommandDescription
/advancement <grant | revoke>Provides or removes players advancements.
/clear Clears items from you or target player inventory.
/datapack <enable | disable | list> Enable or disable a datapack by name or list all datapacks that are installed.
/debug <start | stop | function>Starts or stops a debugging session. This can be used to quickly profile your server.
/difficulty <peaceful | easy | normal | hard>Changes the difficulty on the server. Click here to learn how to permanently change difficulty.
/effect <clear | give> Gives or removes status effect for target player.
/xp <add | set | query>Adds or sets a player to a specified amount of experience points. /experience is an alias for /xp.
/forceload <add | remove | query>Adds and removes chunks that remain constantly loaded.
/gamerule Allows for modifying game rules. Click here for a list of commonly used gamerules.
/give Gives target player a specific item and amount.
/gamemode <creative | survival | adventure | spectator> Changes gamemode for yourself or target player.
/kick [reason]Kick the target player from a server with an optional reason.
/kill Used to kill players entities or items. More information on targets.
/setworldspawnSets the default world spawn point to your current position.
/summon Spawns in a specific entity.
/team <list | add | remove | empty | join | leave | modify)Create, join, leave, and modify teams.
/teleport Teleport the target player(s) to a destination. A destination can be another target player or a coordinate position. /tp is an alias for /teleport
/time <set | add | query>Change the current time in the world.
/weather <clear | rain | thunder>Change the current weather in the world. .