Minecraft Cheats and Console Commands


Below you will find an updated list of all the Minecraft console commands that are entered through the chat window. By pressing the T or default / key, you can see the commands. When you use the / key forward slash also enters that commands need as a prefix, so it is a useful shortcut. You can use up and down arrow as well to see previously entered text, such as all the previously executed commands.

Press Tab ↹ when you enter commands cycles through possible command or arguments. You can even use it to enter the coordinates of the block automatically.


Console Commands
Code Effect
@ [p] The player nearest to you
@ [r] A random player
@ [a] All players
@ [e] All entities in the world.
@ [s] Yourself
clone [x1] [y1 [z1] [x2] [y2] [z2] [x] [y] [z] Clones a selection of blocks to another location. Very helpful if you’re building a city space and want to duplicate multiple buildings to different areas. “ ” is your start point. “ ” is the end point. And “ ” is where you want the cloned blocks to spawn.
difficulty [difficulty] peaceful,easy, normal,hard
effect [player] [effect] [seconds] [amplifier] [hideParticles] Adds a status effect to the targeted player. “[seconds]”, “[amplifier]”, and “[hideParticles]” are all optional conditions, so feel free to ignore them unless you want to change the length, how strong the effect is, or whether the effect shows as particles or not. If you want to remove an effect from a player, type “/effect clear”.
enchant [player] [enchantment ID] [level] Adds an enchantment to the item the player is holding. So that’s smite, bane of the arthropods, sharpness—any enchantment you’d pull from a book or enchant table. Here's a list of Enchantment IDs.
xp [amount] [player] Gives the targeted player an amount of experience points. If you just want to add levels instead, which is easier for enchanting, try “/xp L [player]”.
gamemode [mode] Changes the gamemode for everyone in the session. Add a player’s name to the end of the code to alter the mode for different players. Replace "" with one of the following options:
give [player] [item] [amount] Drops an item into the player’s inventory. Perfect for if you want to start a run with a full set of diamond gear. Just keep in mind the amount section only works for stackable items. You can’t give yourself 100 diamond swords in one go, as cool as that’d be. For a full list of item IDs, head here.
help [command name] Offers additional information about any console command. If you’re trying a command and it isn’t working as it should, type the above command before the name of the command that isn’t working and you’ll be treated to more details about how it works.
gamerule keepInventory [true] Changes the game rules so should you die, you keep all the items in your inventory. Replace “true” with “false” to turn it off again.
kill [Kill Everything] Kills everything, including the player. But should you want to kill another player, use “/kill ”. And to kill a certain type of mob, “/kill @e[type=mobType]”.
playsound [sound] [player] Plays a specific sound file. Great for if you want to use a command block to play a sound when someone opens a door. Who doesn’t love a good doorbell? Take a look at all the sound file names here.
Seed Displays the seed for their current world should you wish to replay the seed again from scratch or pass it along to a mate.
setworldspawn [Players Standing] Changes the world spawn to wherever the player is standing. If you don’t want to do that, you can also set it to a predetermined location with “/setworldspawn
gamerule doDaylightCycle [false] This completely turns the daylight cycle off so it’ll always be the current time of day. To reenable the cycle, replace “false” with “true.”
summon [entity_name] [x] [y] [z] Summons a mob to a specific location. Remove the “[x] [y] [z]” section at the end to have the mob spawn right on top of you. Just remember if you’re spawning the Wither you’ll need to leg it as fast as possible.
tp [target player] [x] [y] [z] Teleports the targeted player to a designated location. And yes, you can indeed teleport a friend into the sky and laugh as their body flails back down to earth.
time set [value] Sets the in-game time. Add one of the following numbers onto the end to change the time of day to something else:
weather [clear/rain/thunder] Changes the in-game weather to a different type. I.e. “/weather thunder” would start a thunderstorm. This one’s a must if you’re going after charged creepers. Nobody's got time to sit around waiting for it to thunder.
gamemode [creative] Changes game mode to Creative (unlimited inventory and flying). /gamemode survival Changes game mode to survival.
weather [clear] Stops it from raining. /toggledownfall Switches rain or snow on and off. /time set day Changes the time to sunrise. /time set night Changes the time to sunset.
help [Command] Details a particular command and its effect.
give [Amount] [DataValue] This allows you to give another player an items or items from your inventory.
tp [Player] This command should allow you to teleport you or another player to your desired location.
kill Allows you to kill your character or another player by adding his/her name to the command.
weather Allows you to change the weather or world.
gamemode [creative] It enables flight, unlimited resources, and prevents mobs from attacking you.
gamemode [survival] It allows mobs to attack you and you must collect resources and everything.
time set [0] It allows you to change the time of the day, ‘0’ for dawn, ‘6000’ for midday, ‘12000’ for dusk, and ‘18000’ for night.
difficulty [peaceful] It changes the difficulty. You can replace ‘Peaceful’ with ‘Easy’, ‘Normal’, or ‘Hard’.
gamerule keepInventory [true] This essentially allows you to keep your inventory upon dying.
gamerule doDaylightCycle [false] This basically allows you to stop the game’s day/night cycle.
summon [Object] This allows you to summon your desired creature/object near you.
cannon [Explode Area] This allows you explode an area where you are pointing.
atlantis [Submerge World] This allows you to submerge the entire world in water; everything except the highest mountains.
jump [Teleport Area] This allows you to teleport to an area you are facing.
mobdamage [Negate Damage] This allows you to negate all the damage dealt to you by mobs.
ride [Mount] This allows you to turn your desired creature into a mount.
instantmine [One Click] This allows you to one-click mine using any available tool.
freeze [Stop Mobs] This allows you to stop mobs where they stand.
falldamage [Toggle Damage] This allows you to toggle Fall Damage on or off.
firedamage [Fire Damage] This allows you to toggle Fire Damage on or off.
waterdamage [Water Damage] This allows you to toggle Water Damage on or off.
superheat [Smelted Form] This allows you to turn any item into its smelted form.
instantplant [Grow Plant] This allows you to instantaneously grow a plant.
dropstore [Store Items] This allows you to store all of your inventory items into a chest that appears near your characters.
itemdamage [Degarding Game] This prevents your items from degrading in the game.
duplicate [Items] This simply duplicates your equipped items.
ability [Player Ability] Grants or revokes a player ability.
advancement [Player Advancements] Gives, removes, or checks player advancements.
ban [Stops Player] Adds player to banlist.
ban-ip [Ip Address] Adds IP address to banlist.
banlist [Show List] Displays banlist.
bossbar [Modifies] Creates and modifies bossbars.
classroommode [Blocks] Ability to edit restricted blocks.
clear [Player Inventory] Clears items from player inventory.
clone [Do Copies] Copies blocks from one place to another.
code [Code COnnection] Used to access code connection.
collect [player position] Creates Agent on the current player position.
createagent [Agents] Collects all items within a one block from Agent in three dimensions.
data [NBT Data] Gets, merges, modifies and removes block entity and entity NBT data.
datapack [Data Packs] Controls loaded data packs.
debug [session] Starts or stops a debugging session.
defaultgamemode [Default Mode] Sets the default game mode.
deop [Revokes] Revokes operator status from a player.
destroy [Direction] Agent destroys block or item in the specified direction.
detect [Collidable Block] Agent detects if there is a collidable block in the specified direction.
detectredstone [Redstone Signal] Agent detects a redstone signal in the specified direction.
difficulty [Difficulty Level] Sets the difficulty level.
dropall [Drop All Items] Agent drops all items from all slots onto the ground by one block in the specified direction.
effect [Effects] Add or remove status effects.
enchant [Player Item] Enchants a player item.
execute [Command] Executes another command.
experience [Player] Adds or removes player experience.
fill [Specific Region] Fills a region with a specific block.
forceload [Forces Chunks] Forces chunks to constantly be loaded or not.
function [Runs] Runs a function.
gamemode [Player] Sets a player's game mode.
gamerule [Queries] Sets or queries a game rule value.
geteduclientinfo [Client Info] Shows the information about the client.
give [Items For Player] Gives an item to a player.
help [Commads] Provides help for commands.
immutableworld [Immutable State] Allows setting immutable state of a world.
kick [Off Server] Kicks a player off a server.
kill [Kill Entities] Kills entities (players, mobs, items, etc.).
list [List Server] Lists players on the server.
locate [Clsest] Locates closest structure.
loot [Items] Drops items from an inventory slot onto the ground.
me [Sender Message] Displays a message about the sender.
mixer [Control] Mixer interactivity control.
mobevent [Specified Event] Enables/disables a specified mob event.
move [Moves Agent] Moves an Agent in a specified direction.
msg [Private Message] Displays a private message to other players.
op [status] Grants operator status to a player.
pardon [Remove Entries] Removes entries from the banlist.
particle [Create Digits] Creates particles.
playsound Plays a sound.
position [Toggle] Toggles player coordinates to be displayed on the HUD.
publish [Singel Player] Opens single-player world to local network.
recipe [Player] Gives or takes player recipes.
reload [Loot Everything] Reloads loot tables, advancements, and functions from disk.
remove Removing agent.
resupply Resupply villagers.
replaceitem [Inventory] Replaces items in inventories.
save [all items] Prepares a backup, queries its status, or resumes.
save-all [Server to Disk] Saves the server to disk.
save-off [Server Saves] Disables automatic server saves.
save-on [Server Saves] Enables automatic server saves.
say [Items] Displays a message to multiple players.
schedule [Function] Delays the execution of a function.
scoreboard [Objectives] Manages scoreboard objectives and players