OGTOOLS

⚙️ Minecraft advanced commands

Command block and data pack work: Commands for conditional execution, reading data, keeping score and calling functions.

Minecraft 26.3  17 commands · Java Edition

At the heart of this group is execute. It does nothing on its own; it runs another command as someone else, at another position or only if a condition is met. Its two most confused subcommands are as and at. The as subcommand changes who runs the command, while at changes where it runs. The two are usually written together.

The scoreboard is the foundation of minigames: It keeps counters, tracks quests and shows rankings at the side of the screen. The manually managed dummy criterion is never changed by the game; it is entirely up to you.

If you want to write long command chains to a file instead of command blocks, data packs and function commands come in. After changing the file you need to run the reload command; the schedule command sets a function to run later, so there is no need to build redstone for a countdown.

Advanced commands: Full list

/data Reads or writes entity, block and storage data Views, changes, copies or removes NBT data. /datapack Manages data packs Lists, enables and disables installed data packs and changes their order. /debug Starts and stops performance profiling Records what the server is doing and writes the result to the debug folder. /dialog Opens a dialog window for a player Shows a dialog window defined in a data pack on a player's screen. /execute Runs a command under different conditions Runs a command as someone else, at another position or only if a condition is met. /fetchprofile Fetches a player profile Resolves a player's profile (ID and skin info); you can then get their head or summon a mannequin. /function Runs a command file Runs the commands written in a data pack's .mcfunction file, in order. /jfr Takes a Java Flight Recorder recording Starts an in-depth performance recording with Java Flight Recorder. /perf Records server performance Takes a 10-second performance sample and produces a report file. /posteffect Applies a visual effect to the screen Adds or removes screen effects such as blur or color inversion for a player. /random Generates a random number Gives a random value in the range you set, or resets the sequence seed. /reload Reloads data packs Applies changes to function, loot table and recipe files without restarting the server. /return Returns a value from a function Ends the running function early and gives a result value. /schedule Schedules a function for later Plans a function to run after the time you set. /scoreboard Sets up and manages scoreboards Creates score objectives, changes player scores and shows them on screen. /stopwatch Sets up a stopwatch and measures time Starts named stopwatches and checks the elapsed time; for timing parkour and race maps. /waypoint Manages waypoints Sets the color and style of the markers shown on the locator bar.

What do these commands need?

CommandPermission neededCheats
/data Operator (level 2) Must be on
/datapack Operator (level 2) Must be on
/debug Server admin (level 3) Must be on
/dialog Operator (level 2) Must be on
/execute Operator (level 2) Must be on
/fetchprofile Operator (level 2) Must be on
/function Operator (level 2) Must be on
/jfr Server owner (level 4) Must be on
/perf Server owner (level 4) Must be on
/posteffect Operator (level 2) Must be on
/random Operator (level 2) Must be on
/reload Operator (level 2) Must be on
/return Operator (level 2) Must be on
/schedule Operator (level 2) Must be on
/scoreboard Operator (level 2) Must be on
/stopwatch Operator (level 2) Must be on
/waypoint Operator (level 2) Must be on

Common questions

What is the difference between execute as and at?

The as subcommand changes who runs the command, so @s now refers to that entity. The at subcommand changes the position and rotation. If you want something to happen at everyone's own position, you write both together.

How do I get a command block?

It is not in the inventory; you can only get it with a command: /give @s command_block. When typing a command into the block, you do not need the leading slash.

Other command categories

Another tool Minecraft crafting recipes Would rather make the item than give it with a command? See the recipe on the 3x3 grid.

Minecraft is a product of Mojang Studios. This tool is an independent helper made for players and is not affiliated with Mojang or Microsoft.