← Back to Home
<required> = must be provided [optional] = can be omitted
Core Gameplay World & Time Entities Blocks Systems
No commands found matching your search.

Core Commands

/give Give an item to a player or target selector item

Syntax

/give <target> <item> [count]

Parameters

NameTypeRequiredDescription
targetSelectorYesPlayer or entity to receive items
itemItemYesItem identifier, e.g., minecraft:diamond
countNumberNoAmount to give

Examples

/give @p minecraft:diamond 5
/give @a minecraft:redstone 64

Open the /give page →

Details

  • Command blocks execute as a server-level source (permission level 2).
  • Use selectors to grant items to multiple targets at once.
/tp Teleport entities to a location or another entity movement

Syntax

/tp <target> <destination>
/tp <target> <x> <y> <z>

Parameters

NameTypeRequiredDescription
targetSelectorYesEntity to teleport
destinationSelector/CoordinatesYesTarget entity or coordinates

Examples

/tp @p 0 80 0
/tp @e[type=zombie] @p

Open the /tp page →

Details

  • Destination can be entity or coordinates.
  • Relative and local coordinates are supported.
/spawnpoint Set a player's respawn location player

Syntax

/spawnpoint <target> [x] [y] [z]

Examples

/spawnpoint @p 0 64 0
Coordinates default to the executor's position when omitted.

Open the /spawnpoint page →

/gamerule Set or query a game rule world

Syntax

/gamerule <rule> [value]

Examples

/gamerule commandBlockOutput true
/gamerule doDaylightCycle false

Open the /gamerule page →

Details

  • Some gamerules are read-only depending on version.

Gameplay & Server

/advancement Grant or revoke advancements progress

Syntax

/advancement grant <targets> only <advancement> [criterion]

Examples

/advancement grant @p only minecraft:story/mine_diamond

Open the /advancement page →

/attribute Read or modify entity attributes entity

Syntax

/attribute <target> <attribute> get

Examples

/attribute @p minecraft:generic.max_health get

Open the /attribute page →

/ban Add a player to the ban list server

Syntax

/ban <targets> [reason]

Examples

/ban Steve Griefing
Dedicated server only. Requires permission level 3.

Open the /ban page →

/ban-ip Ban an IP address from the server server

Syntax

/ban-ip <target|ip> [reason]

Examples

/ban-ip 192.168.1.100
Dedicated server only. Bans all accounts sharing the IP.

Open the /ban-ip page →

/banlist Display the current ban list server

Syntax

/banlist (ips|players)

Examples

/banlist ips
Dedicated server only. Requires permission level 3.

Open the /banlist page →

/bossbar Create and update boss bars ui

Syntax

/bossbar add <id> <name>

Examples

/bossbar add cb:timer "Timer"

Open the /bossbar page →

/clear Remove items from inventories item

Syntax

/clear <targets> [item] [maxCount]

Examples

/clear @p minecraft:stone

Open the /clear page →

/data Read or modify NBT data nbt

Syntax

/data get entity <target> [path]

Examples

/data get entity @p SelectedItem

Open the /data page →

/datapack Manage datapack loading order packs

Syntax

/datapack list

Examples

/datapack enable "file/mypack"

Open the /datapack page →

/debug Start or stop debug profiling debug

Syntax

/debug start

Examples

/debug stop

Open the /debug page →

/deop Remove operator status from a player server

Syntax

/deop <targets>

Examples

/deop Steve
Dedicated server only. Cannot be used in command blocks.

Open the /deop page →

/defaultgamemode Set the default game mode gameplay

Syntax

/defaultgamemode <mode>

Examples

/defaultgamemode survival

Open the /defaultgamemode page →

/difficulty Change the world difficulty gameplay

Syntax

/difficulty <level>

Examples

/difficulty hard

Open the /difficulty page →

/dialog Open, close, or clear a dialog screen gameplay

Syntax

/dialog open <dialog> <targets>

Examples

/dialog open my_dialog @a
Added in snapshot 25w02a (1.21.5). Experimental feature.

Open the /dialog page →

/enchant Add an enchantment to an item item

Syntax

/enchant <target> <enchantment> [level]

Examples

/enchant @p minecraft:sharpness 5

Open the /enchant page →

/fetchprofile Fetch and save profiling data from a running server debug

Syntax

/fetchprofile [dump]

Examples

/fetchprofile dump
Debug/development command. May not be available in all builds.

Open the /fetchprofile page →

/gamemode Change a player's game mode gameplay

Syntax

/gamemode <mode> [target]

Examples

/gamemode creative @p

Open the /gamemode page →

/xp Adjust experience (alias: /experience) progress

Syntax

/xp add <target> <amount> [points|levels]

Examples

/xp add @p 5 levels

Open the /xp page →

/help List commands or show usage info

Syntax

/help [command]

Examples

/help tp

Open the /help page →

/item Modify or copy items in inventories and entities item

Syntax

/item replace block <pos> <slot> with <item> [count]
/item replace entity <targets> <slot> from block <pos> <slot> [modifier]

Examples

/item replace entity @s weapon.mainhand with diamond_sword

Open the /item page →

/jfr Start or stop Java Flight Recorder profiling debug

Syntax

/jfr <start|stop>

Examples

/jfr start
Cannot be used in command blocks. Requires Java Flight Recorder.

Open the /jfr page →

/kick Remove a player from the server server

Syntax

/kick <target> [reason]

Examples

/kick @p Please rejoin

Open the /kick page →

/list Show online players info

Syntax

/list

Examples

/list

Open the /list page →

/locate Find structures or biomes world

Syntax

/locate structure <structure>

Examples

/locate structure minecraft:village

Open the /locate page →

/loot Generate loot from tables item

Syntax

/loot spawn <pos> loot <loot_table>

Examples

/loot spawn ~ ~ ~ loot minecraft:chests/simple_dungeon

Open the /loot page →

/me Send an action-style message chat

Syntax

/me <message>

Examples

/me waves hello

Open the /me page →

/msg Private message (aliases: /tell, /w) chat

Syntax

/msg <target> <message>

Examples

/msg @p Meet at spawn

Open the /msg page →

/say Broadcast a message to all players chat

Syntax

/say <message>

Examples

/say Welcome to the server!

Open the /say page →

/team Create and manage teams server

Syntax

/team add <team> [displayName]
/team join <team> [members]

Examples

/team add red "Red Team"
/team join red @a

Open the /team page →

/teammsg Team-only chat (alias: /tm) chat

Syntax

/teammsg <message>

Examples

/teammsg Regroup at base

Open the /teammsg page →

/title Show titles, subtitles, or actionbars ui

Syntax

/title <targets> title <json>
/title <targets> actionbar <json>

Examples

/title @a title {"text":"Welcome!"}

Open the /title page →

/trigger Let players run trigger objectives system

Syntax

/trigger <objective> [add|set] [value]

Examples

/trigger ready

Open the /trigger page →

/transfer Transfer players to another server server

Syntax

/transfer <hostname> [port] [players]

Examples

/transfer play.example.com 25565 @a
Added in 1.20.5. Requires the server to opt-in via server.properties.

Open the /transfer page →

/version Display the server version debug

Syntax

/version

Examples

/version
Cannot be used in command blocks. Alias: /minecraft:version

Open the /version page →

/op Grant operator status server

Syntax

/op <player>

Examples

/op Steve

Open the /op page →

/pardon Unban a player server

Syntax

/pardon <player>

Examples

/pardon Alex

Open the /pardon page →

/pardon-ip Unban an IP address server

Syntax

/pardon-ip <ip>

Examples

/pardon-ip 192.168.1.10

Open the /pardon-ip page →

/perf Capture server performance metrics debug

Syntax

/perf <start|stop>

Examples

/perf start
Dedicated server only. Cannot be used in command blocks. Captures 10 seconds of metrics.

Open the /perf page →

/particle Spawn particle effects visual

Syntax

/particle <particle> <pos> [delta]

Examples

/particle minecraft:flame ~ ~1 ~ 0.3 0.3 0.3 0 20

Open the /particle page →

/playsound Play a sound to players audio

Syntax

/playsound <sound> <source> <targets>

Examples

/playsound minecraft:entity.arrow.hit master @p ~ ~ ~ 1 1

Open the /playsound page →

/publish Open a single-player world to LAN server

Syntax

/publish [allowCommands] [gamemode] [port]

Examples

/publish true creative 25565
Singleplayer only. Cannot be used in command blocks.

Open the /publish page →

/stopsound Stop sounds for players audio

Syntax

/stopsound <targets> [source] [sound]

Examples

/stopsound @a master

Open the /stopsound page →

/test Run game test framework tests debug

Syntax

/test runthis
/test runthese
/test run <test> [rotationSteps]

Examples

/test runthis
Development/debug command. Requires game test framework to be enabled.

Open the /test page →

/tick Control the game's tick rate debug

Syntax

/tick rate <rate>
/tick freeze
/tick step [time]
/tick unfreeze

Examples

/tick rate 40 — Run at double speed
/tick freeze — Freeze the game
Added in 1.20.3. Cannot be used in command blocks.

Open the /tick page →

/recipe Grant or revoke crafting recipes craft

Syntax

/recipe give <targets> <recipe|*|tag>
/recipe take <targets> <recipe|*|tag>

Examples

/recipe give @p minecraft:stone_pickaxe

Open the /recipe page →

/reload Reload datapacks and functions server

Syntax

/reload

Examples

/reload

Open the /reload page →

/schedule Schedule a function to run later system

Syntax

/schedule function <function> <time> [replace]

Examples

/schedule function mypack:reset 10s

Open the /schedule page →

/stop Shut down the server server

Syntax

/stop

Examples

/stop

Open the /stop page →

/save-all Force a world save server

Syntax

/save-all [flush]

Examples

/save-all flush

Open the /save-all page →

/save-off Disable automatic saving server

Syntax

/save-off

Examples

/save-off

Open the /save-off page →

/save-on Enable automatic saving server

Syntax

/save-on

Examples

/save-on

Open the /save-on page →

/setidletimeout Set idle kick timeout server

Syntax

/setidletimeout <minutes>

Examples

/setidletimeout 15

Open the /setidletimeout page →

/waypoint Manage waypoints for in-game navigation gameplay

Syntax

/waypoint <add|remove|list> [args...]

Examples

/waypoint add "Base" ~ ~ ~
Added in 25w14a (upcoming). Experimental feature.

Open the /waypoint page →

/whitelist Manage the server whitelist server

Syntax

/whitelist <on|off|add|remove|list|reload> [player]

Examples

/whitelist add Steve
Dedicated server only. Cannot be used in command blocks.

Open the /whitelist page →

World & Time

/time Set or add to the current world time world

Syntax

/time set <value>
/time add <value>

Examples

/time set day
/time add 24000

Open the /time page →

Details

  • Time values are in ticks; 24000 is a full day.
/seed Show the world seed world

Syntax

/seed

Examples

/seed

Open the /seed page →

/setworldspawn Set the global world spawn point world

Syntax

/setworldspawn [x] [y] [z] [angle]

Examples

/setworldspawn 0 64 0

Open the /setworldspawn page →

/worldborder Configure the world border world

Syntax

/worldborder set <distance> [time]
/worldborder center <x> <z>

Examples

/worldborder set 1000

Open the /worldborder page →

/forceload Keep chunks loaded world

Syntax

/forceload add <from> [to]

Examples

/forceload add 0 0

Open the /forceload page →

/fillbiome Fill a region with a specific biome world

Syntax

/fillbiome <from> <to> <biome>
/fillbiome <from> <to> <biome> replace <filter>

Examples

/fillbiome ~-16 ~-16 ~-16 ~16 ~16 ~16 minecraft:plains
Added in 1.19.4. Operates on 4×4×4 biome sections.

Open the /fillbiome page →

/place Place structures or features world

Syntax

/place structure <structure> [pos]

Examples

/place structure minecraft:village_plains

Open the /place page →

/weather Control the current weather state world

Syntax

/weather <clear|rain|thunder> [duration]

Examples

/weather clear 6000
/weather thunder 1200

Open the /weather page →

Details

  • Duration is measured in ticks.

Entities

/damage Deal damage to entities entity

Syntax

/damage <target> <amount> [damageType] [at <pos>]
/damage <target> <amount> [damageType] [by <entity>] [from <cause>]

Examples

/damage @e[type=zombie,limit=1] 5 minecraft:magic
Added in 1.19.4. Damage type must be from the damage type registry.

Open the /damage page →

/summon Summon an entity at a location entity

Syntax

/summon <entity> [x] [y] [z] [nbt]

Examples

/summon minecraft:zombie ~ ~ ~
/summon minecraft:armor_stand ~ ~ ~ {Invisible:1b}

Open the /summon page →

Details

  • Use NBT data for equipment, tags, and custom properties.
/kill Kill entities matching a selector entity

Syntax

/kill [target]

Examples

/kill @e[type=item,distance=..5]
/kill @e[type=zombie]

Open the /kill page →

Details

  • Omitting a target kills the executor (use carefully).
/effect Apply or clear status effects entity

Syntax

/effect give <target> <effect> [seconds] [amplifier] [hideParticles]
/effect clear [target]

Examples

/effect give @p speed 10 1
/effect clear @a

Open the /effect page →

/tag Add or remove entity tags entity

Syntax

/tag <targets> add <name>
/tag <targets> remove <name>

Examples

/tag @e[type=armor_stand] add marker

Open the /tag page →

/ride Mount entities onto other entities entity

Syntax

/ride <target> mount <vehicle>
/ride <target> dismount

Examples

/ride @p mount @e[type=horse,limit=1,sort=nearest]

Open the /ride page →

/rotate Rotate entity facing entity

Syntax

/rotate <targets> <yaw> <pitch>

Examples

/rotate @p 90 0

Open the /rotate page →

/spectate Spectate another entity entity

Syntax

/spectate <target> [viewer]

Examples

/spectate @e[type=creeper,limit=1] @p

Open the /spectate page →

/spreadplayers Spread entities across an area entity

Syntax

/spreadplayers <center> <spreadDistance> <maxRange> <respectTeams> <targets>

Examples

/spreadplayers 0 0 10 100 false @a

Open the /spreadplayers page →

Blocks

/setblock Place or replace a single block block

Syntax

/setblock <x> <y> <z> <block> [mode]

Examples

/setblock ~ ~-1 ~ minecraft:redstone_block
/setblock 0 64 0 minecraft:command_block

Open the /setblock page →

Details

  • Use replace, destroy, or keep modes to control behavior.
/fill Fill a region with blocks block

Syntax

/fill <x1> <y1> <z1> <x2> <y2> <z2> <block> [replace|destroy|hollow|outline|keep]

Examples

/fill ~1 ~ ~1 ~5 ~4 ~5 minecraft:glass hollow
/fill 0 64 0 10 70 10 minecraft:stone

Open the /fill page →

Details

  • Large fills can be slow; keep region sizes reasonable.
/clone Copy blocks from one region to another block

Syntax

/clone <start> <end> <destination> [filtered|masked|replace] [force|move|normal]

Examples

/clone ~ ~ ~ ~2 ~2 ~2 ~5 ~ ~
/clone 0 64 0 5 70 5 20 64 20 masked

Open the /clone page →

Details

  • Use masked to ignore air blocks.

Systems

/execute Change execution context and run a command system

Syntax

/execute as <target> at <target> run <command>

Examples

/execute as @a at @s run say Hello
/execute if block ~ ~-1 ~ minecraft:diamond_block run say On diamond

Open the /execute page →

Details

  • Use if and unless to gate actions.
  • Combine with selectors and predicates for complex logic.
/scoreboard Create objectives and track values system

Syntax

/scoreboard objectives add <name> <criteria>
/scoreboard players add <target> <objective> <value>

Examples

/scoreboard objectives add timer dummy
/scoreboard players add @a timer 1

Open the /scoreboard page →

Details

  • Display objectives using /scoreboard objectives setdisplay.
/tellraw Send JSON-formatted chat messages system

Syntax

/tellraw <target> <json>

Examples

/tellraw @a {"text":"Hello","color":"gold"}

Open the /tellraw page →

Details

  • Supports click and hover events.
/function Run a data pack function system

Syntax

/function <name>

Examples

/function mypack:setup

Open the /function page →

/random Generate random values system

Syntax

/random value <min> <max>

Examples

/random value 1 10

Open the /random page →

/return Return from a function system

Syntax

/return [value]

Examples

/return 1

Open the /return page →