Minecraft commands and cheats guide: How to use commands

There are all kinds of commands and cheats that players can use in Minecraft (Image via Mojang)
There are all kinds of commands and cheats that you can use in Minecraft. (Image via Mojang)

Since Minecraft is a sandbox game, almost everything about it can be changed. From changing the entire game's textures to adding and removing gameplay features and more, everything can be done. Though these things are usually achieved with third-party packs and mods, there are a few features of the vanilla game that can be altered using certain commands.

Commands in this game are so powerful that they can even be considered cheats. Here is everything you need to know about commands and cheats.


A complete guide to cheats and commands for Minecraft

What are commands and cheats?

Almost any feature in Minecraft can be altered using commands and cheats. (Image via Sportskeeda)
Almost any feature in Minecraft can be altered using commands and cheats. (Image via Sportskeeda)

First, you must understand what Minecraft commands and cheats actually are. In the most basic terms, commands are lines of simple code that you can feed in order to alter, add, or remove certain in-game vanilla features. It starts with the main command, followed by several other inputs to further specify the entire compilation.

For example, there are commands that allow you to generate any structure anywhere, let you teleport, kill any entity or player, and more.

Cheats are just another word for these commands, simply because they are essentially breaking the conventional survival mode rules. They are also labeled as cheats in certain settings.


How do I enable commands and cheats?

Commands can be activated in two different ways in Minecraft. (Image via Sportskeeda)
Commands can be activated in two different ways in Minecraft. (Image via Sportskeeda)

At first, new players will usually enter a survival mode world and normally play the game. Usually, commands can be entered in the chat box, which can be opened by typing '/'. However, they will soon notice that any of the commands will simply not work. This is because commands, or in the game's language, cheats, need to be activated in that particular world in order for it to work.

There are two ways of activating cheats in a world, depending on whether that world has been created or not.

If it is an existing world in Java Edition, you must first go to the pause menu, click on the 'Open to LAN' button, and then hit 'Activate Cheats'. Though this will create a LAN world that is discoverable by everyone on the same network, it will also give you the ability to use commands in that world.

If the world is in Bedrock Edition, you can open the world settings from the main menu, and toggle the 'Activate Cheats' button.

If you are creating a new world and want to use commands in it, simply toggle on the 'Activate Cheats' button before creating it.


A list of all the commands

Here is a list of all the Minecraft commands that you can use. The first column shows the main command that can be used, and the second column gives a brief description of what it can do:

/?An alternative of /help. Provides help for commands.
/abilityGrants or revokes a player ability.
/advancementGives, removes, or checks player advancements.
/alwaysdayAn alternative of /daylock. Locks and unlocks the day-night cycle.
/attributeQueries, adds, removes or sets an entity attribute.
/banAdds player to ban list.
/ban-ipAdds IP address to ban list.
/banlistDisplays ban list.
/bossbarCreates and modifies boss bars.
/cameraSwitch to custom camera perspectives and fade the screen.
/camerashakeUsed to enable a camera shaking effect.
/changesettingChanges a setting on the dedicated server while it's running.
/clearClears items from player inventory.
/clearspawnpointRemove spawn points in the world.
/cloneCopies blocks from one place to another.
/connectAn alias of /wsserver. Attempts to connect to the web socket server.
/damageApplies damage to the specified entities.
/dataGets, merges, modifies and removes block entity and entity NBT data.
/datapackControls loaded data packs.
/daylockAn alias of /alwaysday. Locks and unlocks the day-night cycle.
/debugStarts or stops a debugging session.
/dedicatedwsserverAttempts to connect to a web socket server.
/defaultgamemodeSets the default game mode.
/deopRevokes operator status from a player.
/dialogueOpens NPC dialogue for a player.
/difficultySets the difficulty level of a world
/effectAdds or removes status effects.
/enchantAdds an enchantment to a player's selected item.
/eventUsed to trigger an event on an entity.
/executeExecutes another command.
/experienceAn alias of /xp. Adds or removes player experience.
/fillFills a region with a specific block.
/fillbiomeFills a region with a specific biome.
/fogUsed for managing active fog settings for players.
/forceloadForces chunks to constantly be loaded or not.
/functionRuns a function.
/gamemodeSets a player's game mode.
/gameruleSets or queries a game rule value.
/gametestTo test the Game Test features.
/giveGives an item to a player.
/helpAn alias of /?. Provides help for commands.
/immutableworldAllows setting immutable state of a world.
/itemManipulates items in inventories.
/jfrStarts or stops a JFR profiling.
/kickKicks a player off a server.
/killKills entities (players, mobs, items, etc.).
/listLists players on the server.
/locateLocates closest structure, biome, or point of interest.
/lootDrops items from an inventory slot onto the ground.
/meDisplays a message about the sender.
/mobeventEnables/disables a specified mob event.
/msgAn alias of /tell and /w. Displays a private message to other players.
/musicAllows the player to control playing music tracks.
/opGrants operator status to a player.
/opsAn alias of /permission. Reloads and applies permissions.
/pardonRemoves entries from the ban list.
/pardon-ipRemoves entries from the ban list.
/particleCreates particles.
/perfCaptures info and metrics about the game for 10 seconds.
/permissionAn alias of /ops. Reloads and applies permissions.
/place
Used to place a configured feature, jigsaw, template, or structure at a given location.
/playanimationUsed to run a one-off animation.
/playsoundPlays a sound.
/publishOpens single-player world to local network.
/recipeGives or takes player recipes.
/reloadReloads loot tables, advancements, and functions from disk.
/removeRemoving agent.
/replaceitemReplaces items in inventories.
/returnControl execution flow inside functions and change their return value.
/ride
Used to make entities ride other entities, stop entities from riding, make rides evict their riders, or summon rides or riders.
/savePrepares a backup, queries its status, or resumes.
/save-allSaves the server to disk.
/save-offDisables automatic server saves.
/save-onEnables automatic server saves.
/sayDisplays a message to multiple players.
/scheduleDelays the execution of a function.
/scoreboardManages scoreboard objectives and players.
/scriptDebugging option for script within the game
/scripteventStarts an event within the script with a specified message ID and payload
/seedDisplays the world seed.
/setblockChanges a block to another block.
/setidletimeoutSets the time before idle players are kicked.
/setmaxplayersSets the maximum number of players allowed to join.
/setworldspawnSets the world spawn.
/spawnpointSets the spawn point for a player.
/spectateMake one player in spectator mode spectate an entity.
/spreadplayersTeleports entities to random locations.
/stopStops a server.
/stopsoundStops a sound.
/structure
Used to save and load structures without having to use structure blocks items in inventories.
/summonSummons an entity.
/tagControls entity tags.
/teamControls teams.
/teammsgAn alias of /tm. Specifies the message to send to team.
/teleportAn alias of /tp. Teleports entities.
/tellAn alias of /msg and /w. Displays a private message to other players.
/tellrawDisplays a JSON message to players.
/testforCounts entities matching specified conditions.
/testforblockTests whether a block is in a location.
/testforblocksTests whether the blocks in two regions match.
/tickingareaAdd, remove, or list ticking areas.
/timeChanges or queries the world's game time.
/titleManages screen titles.
/titlerawControls screen titles with JSON messages.
/tmAn alias of /teammsg. Specifies the message to send to team.
/toggledownfallToggles the weather.
/tpAn alias of /teleport. Teleports entities.
/triggerSets a trigger to be activated.
/volumeareaAdd, remove, or list volume areas.
/wAn alias of /tell and /msg. Displays a private message to other players.
/wbAn alias of /worldbuilder. Ability to edit restricted blocks.
/weatherSets the weather.
/whitelistManages server whitelist.
/worldborderManages the world border.
/worldbuilderAn alias of /wb. Ability to edit restricted blocks.
/wsserverAn alias of /connect. Attempts to connect to the web socket server.
/xp
An alias of /experience‌[Java Edition only]. Adds or removes player experience.

Inputs after the command

youtube-cover

Remember, almost all the commands need more specific inputs after them to work correctly. Thankfully, the game will automatically show the next input you could enter in order to use the command correctly.

After the main command, a list will pop up, showing all the possible inputs. Hence, inputting commands in Minecraft is quite simple once you learn it and get into the groove.

Quick Links