Skip to Content

Minecraft Guide

List of Minecraft Commands and Cheat Codes

List of Minecraft Commands and Cheat Codes

When playing Minecraft, it is possible to type commands into the chat box (opened by pressing “T” or “/”). These commands can trigger useful changes such as changing the time of day and weather or also provide utility such as teleporting around the map or giving items.

While in a multiplayer Minecraft game, these commands are helpful for Admins to do their job running the server. However, in a single-player game by yourself, these commands can be considered as “cheat codes” to make the game easier.

Most commands or cheat codes have some restrictions in Minecraft. On a multiplayer server, for most commands the player needs to be a server operator/admin (OP) and on a single-player game the “allow cheats” option must be selected when first creating the world.

Note that server plugins and modpacks can add new commands to the game. This list will only cover the commands and cheats available in the base version of the game without any mods or plugins. Multiplayer servers will often have additional and different commands available.

Here is our list of the most popular and common Minecraft Commands and Cheat Codes!

General Minecraft Commands

The following commands can be used by any player in all Minecraft games (unless restricted by a multiplayer server owner):

  • /help or /? – Provides a list of common commands.minecraft commands and cheats
  • /list – Provides a list of players online.
  • /me [text] – Sends an “emote” message into chat.
  • /msg [name] [message] – Sends a private message to the player specified in [name]. Alternatively, /tell and /w are the same as /msg.
  • /seed – Displays the map seed.
  • /teammsg [message] – Sends a private message to your team. Alternatively, /tm [message] can also be used. Only available in Java Edition, and teams are created by OPs.

Operator (OP) Minecraft Commands and Cheats

The following commands can only be used by OPs / Admins of a multiplayer server, or when “allow cheats” is enabled in a single-player game.

Utility Commands and Cheats

  • /clear – Deletes all items in your inventory.
  • /difficulty [easy|normal|hard|peaceful] – Changes the game’s difficulty
  • /effect – Modifies status effects on players.
  • /enchant [player] [enchant] [enchant level]Enchants a player’s gear. For example, /enchant Bob Fortune 3 will enchant Bob’s tool with Fortune 3.
  • /xp [player] [add|set] [amount] – Adds to or sets a player’s experience by the amount specified. May also use /experience for same effect in Java Edition.
  • /forceload – Forces a chunk to stay loaded. Only applicable to Java Edition.
  • /gamemode [survival|creative|adventure|spectator] [player] – Changes a player’s gamemode. Commonly used by admins to switch between survival and creative mode.
  • /give [playername] [item] [amount] – Gives the specified [item] to the [player] in the [amount] specified.
  • /kill [player] – Kills the specified player.
  • /locate [structure] – Displays coordinates for the nearest specified structure. For example, /locate mansion will display coordinates for the nearest Woodland Mansion.
  • /locatebiome [biome] – Displays coordinates for the nearest specified biome. Only useable in Java edition.
  • /time [set|add] [amount] – Changes the time of the day. For example, /time set day will automatically set the time to morning. For another example, /time add 100 will add 100 to the time-value and fast-forward the time slightly.
  • /weather [clear|thunder|rain] [duration] – Toggles the weather for the specified [duration] in seconds. If no duration is specified, the weather change will last for 5 minutes.

Multiplayer Server Management Commands

* Note: The majority of these commands can be used in the server’s console without using the slash. For example, for a brand new server you can make yourself an OP by typing “op [name]” directly into the console, or you could save the map by typing “save-all”.

  • /kick [name] – Kicks the player from the server. The player is free to rejoin at any time.
  • /ban [name] – Bans a player from the server.
  • /ip-ban [name] – Bans a player’s IP from the server.
  • /banlist – Displays the players currently banned from the server.
  • /op [name] – Assigns a player as a server operator (OP).
  • /deop [name] – Revokes a player’s OP status.
  • /pardon [name] – Unbans a player from the server.
  • /pardon-ip [name] – Unbans a player’s IP from the server.
  • /save-all – Saves the game world.
  • /stop – Turns off the server.
  • /save-off and /save-on – Toggles whether the server should automatically save at intervals. If turned off, the server is only saved by the /save-all command.
  • /say – Announces a message to the entire server.
  • /setworldspawn – Changes the world spawn the the player’s location. If executed in the console, coordinates would need to be provided.
  • /spawnpoint [name] – Changes an individual player’s respawn point to this location.
  • /summon [entity] [position] – Spawns an entity, for example a creeper. A custom position can be specified but is not required.
  • /team – Allows for creation of teams, which can chat with each other exclusively using /tm [message].
  • /tp [target] [destination] – Teleports one player (the target) to either another player or coordinate (the destination). For example, /tp Bob Joe will teleport the player “Bob” to “Joe”. /tp Bob 0 70 0 would teleport Bob to coordinates 0, 70, 0.
  • /whitelist [add|remove|on|off|list|reload] [name] – Toggles whitelist functions. A whitelist is a list of players who are allowed to join the server and is useful for stopping griefers or random people from joining your server. A whitelist can be turned on or off with /whitelist on and /whitelist off. To view the full list, /whitelist list is used. Player names can be added or removed to the list using /whitelist add [name] and /whitelist remove [name]. If the whitelist text file is modified, /whitelist reload will update the list from the file.
  • /worldborder – Toggles the world border, only useable in Java Edition.