Skip to content
Back to Homepage

All Minecraft Java Edition Console Commands

This page lists Minecraft Java Edition server console commands. Each command includes a description, an example, and the OP level required to run it. If you just want to jump straight to a specific command, use the complete command list below, or check Common Server Admin Commands for the ones you’ll use most often.

In-game chat uses the same command arguments, with a leading /. On the dedicated server console, enter that command without the leading /. For example, a player types /list in chat, while on the console (including the Console page in the AleForge Panel) you’d type just list.

Operator permissions apply when a player runs a command in chat. The player must be an operator, and their permission level must be at least the OP level listed for that command. A higher level includes every command from the levels below it, so an operator with level 4 can run every command on this page, including the level 2 and level 3 ones.

OP level What it allows
0 Commands any player can run, like /help or /list, no operator status needed.
1 Bypasses spawn protection.
2 Most gameplay and world-editing commands, such as /gamemode, /give, /tp, and /time. This is the typical level for a trusted builder or moderator.
3 Player moderation and server management commands, such as /ban, /kick, /op, and /whitelist. This is the typical level for a server admin.
4 Full control, including /stop, /save-all, and other commands that directly affect the running server process.

The level granted by /op comes from op-permission-level in server.properties, which defaults to 4. This means that by default, anyone you make an operator gets full level 4 access. If you want to give someone operator status without handing over full control (for example, a moderator who shouldn’t be able to stop the server), lower this value in server.properties before running /op on their account.

The server console itself already runs at the highest permission level, so operator status is never required when running commands directly from the Console page in the panel.

These examples and OP levels are for Java Edition. Bedrock Edition uses different syntax and permission levels for many of the same command names.

  • Java /gamemode takes the mode first (/gamemode creative PlayerName) and does not accept a numeric mode.
  • Java /difficulty accepts peaceful, easy, normal, or hard. A numeric difficulty such as 3 is a Bedrock form.
  • Commands such as /give, /tp, /time, and /weather require OP level 2 in Java and OP level 1 in Bedrock.
  • Java /whitelist requires OP level 3. Bedrock /whitelist, also called /allowlist, requires OP level 4.

Command syntax, console entry, and permission levels are documented on the Minecraft Wiki: Commands, permission level, server.jar, and server.properties.

These commands are taken from the complete list and grouped by the job they do on a server, so you don’t have to hunt through the full table for the handful you’ll actually use day to day. The example and OP level for each one match the complete list below. Replace PlayerName with the player’s username.

Use these to deal with rule-breakers or disruptive players. /kick only removes them from the current session, so they can rejoin right away, while /ban prevents them from reconnecting at all until you /pardon them.

Example OP level
/ban PlayerName 3
/kick PlayerName 3
/pardon PlayerName 3

Operators can run higher-level commands in chat, up to whatever op-permission-level is set to in server.properties (default 4). Only grant this to people you fully trust, since by default it includes the ability to stop the server.

Example OP level
/op PlayerName 3
/deop PlayerName 3

With white-list=true set in server.properties, only players on the whitelist can join. This is useful for private or invite-only servers.

Example OP level
/whitelist add PlayerName 3

Move a player (or any entity) to a specific set of coordinates, or to another entity’s location.

Example OP level
/tp PlayerName 0 0 0 2

Switch a player between Survival, Creative, Adventure, and Spectator mode, either individually or as the server’s default for new players.

Example OP level
/gamemode creative PlayerName 2
/defaultgamemode creative 2

Give or remove items directly, useful for testing, rewarding players, or recovering lost items after a bug or rollback.

Example OP level
/give PlayerName minecraft:diamond_block 64 2
/clear PlayerName 2

Skip to day, night, or any specific tick of the day/night cycle, overriding the natural passage of time.

Example OP level
/time set day 2

Force clear skies, rain, or a thunderstorm, instead of waiting for the weather to change naturally.

Example OP level
/weather clear 2

Replace PlayerName with the player’s username. EntityName, OtherEntity, and TargetName stand in for entity names. The spectator command names the entity first, then the player who is spectating.

Command Description Example OP level
/advancement Gives, removes, or checks player advancements /advancement grant PlayerName everything 2
/attribute Queries, adds, removes, or sets an entity attribute /attribute PlayerName minecraft:attack_speed base set 100 2
/ban Adds a player to the ban list /ban PlayerName 3
/ban-ip Adds an IP address to the ban list /ban-ip 123.45.67.89 3
/banlist Displays the ban list /banlist 3
/bossbar Creates and modifies boss bars Used in datapacks 2
/clear Clears items from a player inventory /clear PlayerName 2
/clone Copies blocks from one place to another /clone 0 0 0 100 100 100 -100 -100 -100 2
/damage Applies damage to the selected entities /damage PlayerName 10 2
/data Gets, merges, modifies, and removes block entity and entity NBT data Used in datapacks 2
/datapack Controls loaded datapacks. Creating a pack with /datapack create requires OP level 4 /datapack list 2
/debug Starts or stops a debugging session /debug start 3
/defaultgamemode Sets the default game mode /defaultgamemode creative 2
/deop Revokes operator status from a player /deop PlayerName 3
/difficulty Sets the difficulty level /difficulty hard 2
/effect Adds or removes a status effect /effect give PlayerName minecraft:regeneration 2
/enchant Adds an enchantment to a player’s selected item /enchant PlayerName minecraft:unbreaking 2
/execute Executes another command /execute run say I executed this! 2
/experience Adds or removes player experience /experience add PlayerName 100 2
/fill Fills a region with a specified block /fill 0 0 0 100 100 100 minecraft:diamond_block 2
/fillbiome Fills a region with a specified biome /fillbiome 0 0 0 100 100 100 minecraft:badlands 2
/forceload Forces chunks to stay loaded or not /forceload add 0 0 2
/function Runs a function /function myfunction 2
/gamemode Sets a player’s game mode /gamemode creative PlayerName 2
/gamerule Sets or queries a game rule /gamerule playersSleepingPercentage 20 2
/give Gives a player an item /give PlayerName minecraft:diamond_block 64 2
/help Provides help for commands /help gamemode 0
/item Manipulates items in inventories /item replace entity PlayerName armor.chest with minecraft:netherite_chestplate 2
/jfr Starts or stops JFR profiling /jfr start 4
/kick Kicks a player from the server /kick PlayerName 3
/kill Kills entities /kill PlayerName 2
/list Lists players on the server /list 0
/locate Locates the closest structure, biome, or point of interest /locate structure minecraft:ancient_city 2
/loot Drops items from an inventory slot onto the ground /loot spawn ~ ~ ~ mine ~ ~-1 ~ 2
/me Displays a message about the sender /me is playing Minecraft 0
/msg An alias of /tell and /w. Displays a private message to other players /msg PlayerName secret message! 0
/op Grants operator status to a player /op PlayerName 3
/pardon Removes a player from the ban list /pardon PlayerName 3
/pardon-ip Removes an IP address from the ban list /pardon-ip 123.45.67.89 3
/particle Creates particles /particle minecraft:bubble ~ ~ ~ 0 0 0 0.1 100 normal 2
/perf Captures info and metrics about the game for 10 seconds /perf start 4
/place Places a configured feature, jigsaw, template, or structure /place structure minecraft:village_desert 2
/playsound Plays a sound /playsound minecraft:ambient.cave master @a 2
/publish Opens a single-player world to the local network. This command is not available on a dedicated server /publish 4
/random Draws a random value or controls the random number sequence. Drawing a value requires OP level 0. Using or resetting a sequence requires OP level 2 /random roll 1..6 0
/recipe Gives or takes player recipes /recipe give PlayerName minecraft:crafting_table 2
/reload Reloads loot tables, advancements, and functions from disk /reload 2
/return Controls execution flow inside functions and changes their return value Used in datapacks 2
/ride Makes entities ride other entities, or stops entities from riding /ride EntityName mount OtherEntity 2
/save-all Saves the server to disk /save-all 4
/save-off Disables automatic server saves /save-off 4
/save-on Enables automatic server saves /save-on 4
/say Displays a message to multiple players /say hello all! 2
/schedule Delays the execution of a function /schedule function myfunction 100s 2
/scoreboard Manages scoreboard objectives and players /scoreboard players set PlayerName objective 1 2
/seed Displays the world seed. On a multiplayer server this requires OP level 2 /seed 2
/setblock Changes a block to another block /setblock 0 0 0 minecraft:slime_block replace 2
/setidletimeout Sets the time before idle players are kicked, in minutes /setidletimeout 120 3
/setworldspawn Sets the world spawn /setworldspawn 0 0 0 2
/spawnpoint Sets the spawn point for a player /spawnpoint PlayerName 0 0 0 2
/spectate Makes a player in Spectator mode spectate an entity. Name the entity first, then the spectator /spectate TargetName PlayerName 2
/spreadplayers Teleports entities to random locations /spreadplayers 0 0 1 10 false @a 2
/stop Stops a server /stop 4
/stopsound Stops a sound /stopsound PlayerName master 2
/summon Summons an entity /summon minecraft:bat 2
/tag Controls entity tags /tag EntityName add myTag 2
/team Controls teams /team add Red 2
/teammsg An alias of /tm. Sends a message to the team /teammsg help cap blue 0
/teleport Teleports entities /tp PlayerName 0 0 0 2
/tell An alias of /msg and /w. Displays a private message to other players /tell PlayerName secret message! 0
/tellraw Displays a JSON message to players /tellraw @a {"text":"Hello"} 2
/time Changes or queries the world’s game time /time set day 2
/title Manages screen titles /title PlayerName clear 2
/tm An alias of /teammsg. Sends a message to the team /tm where is the team right now 0
/tp An alias of /teleport /tp PlayerName 0 0 0 2
/trigger Sets a trigger to be activated /trigger mytrigger 0
/w An alias of /tell and /msg. Displays a private message to other players /w PlayerName hello friend! 0
/weather Sets the weather /weather clear 2
/whitelist Manages the server whitelist /whitelist add PlayerName 3
/worldborder Manages the world border /worldborder add 100 2
/xp An alias of /experience. Adds or removes player experience /xp add PlayerName 100 2
  • Use tab-complete. Typing a command and pressing Tab will autocomplete command names, player names, coordinates, and item IDs, both in the AleForge Panel console and in-game. This saves a lot of typing and avoids typos in longer commands.
  • Target selectors work in most commands. Instead of typing a specific player’s name, you can use selectors like @a (all players), @p (nearest player), @r (a random player), or @e (all entities) wherever a command accepts a target. For example, /effect give @a minecraft:speed gives every player a speed boost.
  • Always save before destructive commands. Commands like /fill, /clone, and /reload can affect large parts of your world. Run /save-all first if you want to be able to recover with a backup should something go wrong.
  • Datapack-only commands still need to be triggered. Commands like /bossbar, /data, and /return aren’t typically typed manually. They’re designed to be used inside functions and datapacks, and won’t do much run on their own without the right context set up.