Log in Add Server

You type /gamemode 1 on a Java server and nothing happens. Normal: for several versions now, it is /gamemode creative on Java, not the number. You try /ban on Bedrock to kick out a griefer, the command does not exist. Bedrock has no native /ban. This kind of difference between the two editions wastes a huge amount of time when you administer a server. This guide covers all the commands that really work in 2026, with Java/Bedrock differences marked every time.

Key takeaways

  • Java uses 4 OP levels (1 to 4). Bedrock uses 3 roles (visitor, member, operator) via permissions.json.
  • On Bedrock, commands require cheats to be enabled in the world settings, even if you are an operator.
  • Commands are typed in the chat (T or / key) in game, or in the server console (without the slash).
  • Bedrock has no /ban, /data, /fillbiome, /advancement or /function. Java has no /allowlist, /setmaxplayers, /daylock or /tickingarea.

Becoming operator and permission levels

Java Edition

On a Java server, you cannot give yourself OP rights from the in-game chat. You have to go through the server console:

op PlayerName

Java uses 4 operator levels, configurable in server.properties via op-permission-level:

  • Level 1: bypass of spawn protection
  • Level 2: gameplay and cheat commands (/give, /tp, /summon, /gamemode, /gamerule, /fill)
  • Level 3: moderation (/op, /deop, /kick, /ban, /whitelist)
  • Level 4: server administration (/stop, /save-all, /publish)

Bedrock Edition

Bedrock uses permissions.json with three roles: visitor, member, operator. You can also grant OP status from the console with op PlayerName. The fundamental difference: on Bedrock, even an operator cannot run commands if cheats are not enabled in the world settings. This is the most common trap.

Enabling cheats on Bedrock permanently disables achievements for that world. Disabling them afterwards does not restore them.

Player management commands

Command Java Bedrock Description Example
/op ✅ ✅ Gives operator status to a player /op Steve
/deop ✅ ✅ Removes operator status /deop Steve
/kick ✅ ✅ Kicks a player with an optional message /kick Steve Inappropriate behavior
/ban ✅ ❌ Bans a player (Java only) /ban Steve Grief
/ban-ip ✅ ❌ Bans an IP address (Java only) /ban-ip 192.168.1.1
/banlist ✅ ❌ Displays the list of banned players or IPs /banlist players
/pardon ✅ ❌ Unbans a player /pardon Steve
/pardon-ip ✅ ❌ Unbans an IP address /pardon-ip 192.168.1.1
/whitelist ✅ ❌ Manages the whitelist (on/off/add/remove/list) /whitelist add Steve
/allowlist ❌ ✅ Bedrock equivalent of /whitelist /allowlist add Steve
/list ✅ ✅ Displays the list of connected players /list
/setmaxplayers ❌ ✅ Changes the max number of players (Bedrock) /setmaxplayers 20
/setidletimeout ✅ ❌ Sets the inactivity time (in minutes) before AFK kick /setidletimeout 10
/opreload ❌ ✅ Reloads the operator permissions configuration. Alias: /permission /opreload

The absence of /ban on Bedrock is a point not to overlook for server admins. On a dedicated Bedrock server, moderation goes through allowlist.json (whitelist) or through third-party add-ons. There is no native ban from the command line.

Communication and display commands

Command Java Bedrock Description Example
/say ✅ ✅ Displays a message in chat in the server's name /say The server restarts in 5 min
/msg ✅ ✅ Private message to a player. Aliases: /tell, /w /msg Steve Meet me at spawn
/me ✅ ✅ Third-person message in chat /me builds a castle
/tellraw ✅ ✅ Sends a JSON-formatted message to one or more players /tellraw @a {"text":"Welcome","color":"gold"}
/help ✅ ✅ Displays the list of commands or help for a specific command. Alias: /? /help gamemode
/teammsg ✅ ❌ Private message to all members of your scoreboard team. Alias: /tm /teammsg Regroup at spawn
/title ✅ ✅ Displays a large title on screen (title, subtitle, actionbar, times, clear) /title @a title {"text":"Welcome!","color":"gold"}
/titleraw ❌ ✅ Bedrock version of /title with raw JSON /titleraw @a title {"rawtext":[{"text":"Hi"}]}
/bossbar ✅ ❌ Creates and manages custom boss bars (add, set, remove) /bossbar add mybar "Event in progress"
/team ✅ ❌ Manages teams (colors, collision, nametags, chat). add/join/modify/remove /team add red

/title is the base of every server event. Combine it with /execute to display contextual messages when a player enters a zone. /bossbar lets you create progress bars visible to everyone (match timer, mob counter). Boss bars persist even after a server restart.

Audio and visual commands

Command Java Bedrock Description Example
/playsound ✅ ✅ Plays a sound at a location or for a player /playsound minecraft:entity.ender_dragon.growl master @a
/stopsound ✅ ✅ Stops a sound that is playing /stopsound @a
/particle ✅ ✅ Generates particles at a position /particle heart 0 70 0 1 1 1 0.1 50
/music ❌ ✅ Controls background music (play, queue, stop, volume) /music play record.pigstep 1.0 0.0 loop
/camerashake ❌ ✅ Shakes a player's camera (impact effect) /camerashake add @a 0.5 1 rotational
/playanimation ❌ ✅ Plays an animation on an entity (Bedrock) /playanimation @e[type=villager] animation.villager.celebrate
/posteffect ✅ ❌ Applies a post-processing visual filter (Java 26.x) /posteffect minecraft:creeper

Gameplay commands

Command Java Bedrock Description Example
/gamemode ✅ ✅ Changes the game mode. Java: names (creative). Bedrock: names or numbers (1). /gamemode creative Steve
/defaultgamemode ✅ ✅ Sets the default game mode for new players /defaultgamemode survival
/difficulty ✅ ✅ Changes the difficulty. Java: names. Bedrock: names or numbers (0-3). /difficulty hard
/give ✅ ✅ Gives an item to a player /give @p diamond 64
/clear ✅ ✅ Clears a player's inventory (or a specific item) /clear Steve
/tp ✅ ✅ Teleports a player to coordinates or another player. Alias: /teleport /tp Steve 100 64 -200
/spawnpoint ✅ ✅ Sets a player's spawn point /spawnpoint Steve 0 64 0
/setworldspawn ✅ ✅ Sets the world spawn /setworldspawn 0 64 0
/kill ✅ ✅ Kills an entity or a player /kill @e[type=zombie]
/effect ✅ ✅ Applies or removes a potion effect /effect give @p speed 60 2
/enchant ✅ ✅ Enchants the item held in hand /enchant @p sharpness 5
/xp ✅ ✅ Gives XP or levels. Java alias: /experience /xp add Steve 30 levels
/summon ✅ ✅ Spawns an entity at a position /summon zombie ~ ~ ~
/spreadplayers ✅ ✅ Randomly scatters players across an area /spreadplayers 0 0 10 100 false @a
/damage ✅ ✅ Deals damage to an entity with a specific type /damage @e[type=zombie,limit=1] 10 minecraft:fire
/attribute ✅ ❌ Reads or modifies an entity attribute (health, speed, etc.) /attribute @p minecraft:max_health base set 40
/spectate ✅ ❌ Follows an entity in spectator mode (Java) /spectate @e[type=player,limit=1]
/ability ❌ ✅ Grants or removes a special ability (mute, mayfly, worldbuilder) /ability @p mayfly true

On Java, /give uses the item_id[components] syntax for items with specific data. On Bedrock, numeric data values are still used for some variants. The two systems are not interchangeable.

World commands

Command Java Bedrock Description Example
/time set ✅ ✅ Sets the time (day, night, noon, midnight, or ticks) /time set day
/time add ✅ ✅ Advances time /time add 6000
/weather ✅ ✅ Changes the weather (clear, rain, thunder) /weather clear 999999
/toggledownfall ❌ ✅ Toggles rain/clear weather (legacy Bedrock command, removed in Java 1.13) /toggledownfall
/gamerule ✅ ✅ Modifies a game rule /gamerule keepInventory true
/daylock ❌ ✅ Locks the day/night cycle at the current time. Alias: /alwaysday /daylock true
/worldborder ✅ ❌ Manages the world border (Java only) /worldborder set 10000
/fill ✅ ✅ Fills an area with blocks (replace, destroy, keep, hollow, outline) /fill 0 60 0 50 70 50 stone
/clone ✅ ✅ Copies an area of blocks to another position /clone 0 60 0 10 70 10 100 60 100
/setblock ✅ ✅ Places a block at a precise position /setblock 0 64 0 diamond_block
/fillbiome ✅ ❌ Changes the biome of an area (Java only) /fillbiome 0 -64 0 100 320 100 jungle
/tickingarea ❌ ✅ Creates an always-loaded zone even with no players (Bedrock) /tickingarea add 0 0 0 100 100 100 myzone
/forceload ✅ ❌ Forces permanent loading of chunks (Java) /forceload add 0 0 100 100
/immutableworld ❌ ✅ Makes the world unmodifiable by non-operators (Bedrock) /immutableworld true

Most useful gamerules

Gamerule Default value What it changes
keepInventory false Players keep their inventory on death
doDaylightCycle true The day/night cycle stops if false
doWeatherCycle true Weather stays fixed if false
mobGriefing true Mobs no longer destroy blocks if false (creepers, endermen)
doMobSpawning true Disables natural mob spawning if false
doFireTick true Fire no longer spreads if false
commandBlockOutput true Hides command block messages in chat if false
pvp true Disables player-vs-player damage if false
showDeathMessages true Hides death messages in chat if false
naturalRegeneration true Health no longer regenerates naturally if false (UHC mode)
playersSleepingPercentage 100 Percentage of players that must sleep to skip the night (Java)

mobGriefing false is the most-enabled gamerule on community servers. The side effect many forget: villagers can no longer pick up food or farm, which breaks automatic villager farms.

Exploration and location commands

Command Java Bedrock Description Example
/locate structure ✅ ✅ Finds the nearest structure (village, stronghold, etc.) /locate structure minecraft:village_plains
/locate biome ✅ ✅ Finds the nearest biome /locate biome minecraft:jungle
/locate poi ✅ ❌ Finds the nearest point of interest (Java) /locate poi minecraft:bee_nest
/place ✅ ❌ Places a structure, feature or template at a position (Java) /place structure minecraft:village_plains ~ ~ ~
/waypoint ✅ ❌ Manages personal waypoints (Java 26.x) /waypoint add mybase ~ ~ ~

/locate is essential for quickly finding a stronghold or a village. On Java, the command displays a clickable link in chat to teleport there directly.

Advanced item and entity commands

Command Java Bedrock Description Example
/item ✅ ❌ Modifies or replaces an item in an inventory or block slot (Java) /item replace entity @p armor.head with diamond_helmet
/replaceitem ❌ ✅ Bedrock equivalent of /item (old name, removed in Java 1.17) /replaceitem entity @p slot.armor.head 0 diamond_helmet
/loot ✅ ❌ Generates loot from a loot table (Java) /loot give @p loot minecraft:chests/simple_dungeon
/recipe ✅ ❌ Gives or removes crafting recipes (Java) /recipe give @p *
/ride ❌ ✅ Mounts/dismounts an entity on another (Bedrock) /ride @p start_riding @e[type=horse,c=1]
/tag ✅ ✅ Adds or removes a tag on an entity (for targeting with selectors) /tag @p add staff
/event ❌ ✅ Triggers a predefined event on an entity (Bedrock) /event entity @e[type=creeper] minecraft:start_explosion

Server commands

Command Java Bedrock Description Example
/stop ✅ ✅ Shuts down the server cleanly (save included) /stop
/save-all ✅ ❌ Forces a world save (Java). Add flush to force disk write. /save-all flush
/save-off ✅ ❌ Disables automatic saves (for maintenance/backup) /save-off
/save-on ✅ ❌ Re-enables automatic saves /save-on
/save hold ❌ ✅ Prepares a save (Bedrock, step 1) /save hold
/save query ❌ ✅ Checks whether the save is ready (Bedrock, step 2) /save query
/save resume ❌ ✅ Resumes normal operation after the save (Bedrock, step 3) /save resume
/reload ✅ ✅ Reloads datapacks (Java) or behavior packs (Bedrock) /reload
/seed ✅ ✅ Displays the world seed /seed
/publish ✅ ❌ Opens a singleplayer world to LAN (Java) /publish true creative 25565
/unpublish ✅ ❌ Closes the LAN world (Java 26.x) /unpublish
/transfer ❌ ✅ Transfers a player to another server (Bedrock) /transfer 192.168.1.100 19132

/save-off and /save-on are used during backups. Chain /save-off, /save-all flush, copy the world files, then /save-on. This guarantees the files do not change during the copy.

Target selectors

Selectors replace a player name with a filter that dynamically targets one or more entities.

Selector Target Java Bedrock
@p The nearest player ✅ ✅
@a All players ✅ ✅
@r A random player ✅ ✅
@e All entities (players + mobs + items) ✅ ✅
@s The entity running the command ✅ ✅
@n The nearest entity (added in 1.21) ✅ ✅

The filters in square brackets differ between Java and Bedrock:

  • @e[type=zombie,distance=..10]: all zombies within 10 blocks (Java)
  • @e[type=zombie,r=10]: same thing on Bedrock (r instead of distance)
  • @a[gamemode=survival]: all players in survival (Java)
  • @a[m=0]: same thing on Bedrock (m instead of gamemode)
  • @e[type=item,limit=1,sort=nearest]: the nearest dropped item (Java)
  • @e[type=item,c=1]: Bedrock equivalent (c instead of limit)

Java supports nbt=, team= and predicate= that Bedrock does not have. Bedrock has has_property for entity properties.

The /execute command

/execute is Minecraft's most powerful command. It lets you run a command on behalf of another entity, at another position, under certain conditions.

Java subcommands: as, at, positioned, if, unless, store, on, summon, run. Bedrock does not have on, summon, store, or positioned over.

Concrete examples:

  • /execute as @a at @s run particle heart ~ ~2 ~: heart particles above each player
  • /execute if entity @e[type=zombie,distance=..5] run say Zombie nearby!: alert if a zombie is within 5 blocks
  • /execute at @e[type=creeper] run kill @s: kills all creepers
  • /execute store result score @p timer run time query daytime: stores the time in a score

On Bedrock before 1.19.30, /execute used a completely different syntax (/execute @e ~ ~ ~ command). If a tutorial uses that syntax, it is outdated.

Scoreboard and advancement commands

Command Java Bedrock Description Example
/scoreboard objectives ✅ ✅ Creates, deletes and displays objectives (add, remove, setdisplay) /scoreboard objectives add kills playerKillCount
/scoreboard players ✅ ✅ Manages player scores (set, add, remove, reset) /scoreboard players set Steve kills 10
/trigger ✅ ❌ Lets non-OPs modify a trigger score (Java) /trigger vote set 1
/advancement ✅ ❌ Manages advancements (grant, revoke). Java only. /advancement grant @p everything

/trigger is the only command non-OP players can run on Java (with /tell, /me, /help). It is what lets you create voting systems or interactive menus without giving out OP rights. The trigger score must first be created with /scoreboard objectives add vote trigger.

Automation commands (Java)

Command Description Example
/function Runs a .mcfunction file from a datapack /function mypack:start
/schedule Schedules a function to run after a delay /schedule function mypack:restart 10m
/datapack Manages datapacks (enable, disable, list) /datapack list
/data Reads or modifies the NBT data of entities, blocks or storages /data get entity @p Inventory
/random Generates a random number or uses a sequential generator (Java 26.x) /random value 1..6
/return Returns a value from a function and stops its execution /return 1
/tick Controls the server tick speed (rate, freeze, step) /tick rate 40

/data is the most powerful command and the most absent from Bedrock. It lets you read and modify the internal data of any entity or block. There is no equivalent on Bedrock, which is the most significant technical difference between the two editions.

/tick rate 40 speeds the server up to 40 ticks/second (double speed). Combined with /tick freeze and /tick step, it is a debugging tool for testing redstone mechanisms or automatic farms.

Debug and diagnostic commands (Java)

Command Description Example
/debug start/stop Starts or stops a performance profile (generates a .txt file) /debug start
/perf start/stop Starts a 10-second performance profile (server side) /perf start
/jfr start/stop Starts a Java Flight Recorder session to profile the server /jfr start
/fetchprofile Retrieves a performance profile (Java 26.x) /fetchprofile

Bedrock-exclusive commands

Bedrock has several commands that do not exist on Java, mainly related to add-ons, behavior packs and player experience control.

Command Description Example
/clearspawnpoint Removes a player's spawn point (returns to the world spawn) /clearspawnpoint @p
/dialogue Opens, changes or closes an NPC dialogue /dialogue open @e[type=npc,c=1] @p
/fog Pushes or removes a fog setting for a player /fog @a push mypack:red_fog my_fog
/hud Shows or hides interface elements (hearts, hunger, hotbar) /hud @a hide all
/inputpermission Controls a player's inputs (movement, camera, attack) /inputpermission set @a movement disabled
/mobevent Enables or disables mob events (raids, patrols) /mobevent minecraft:pillager_patrols_event false
/structure Saves or loads a structure from a .mcstructure file /structure save mystructure 0 64 0 10 10 10
/volumearea Creates a 3D zone with properties (audio, fog, biome) /volumearea add mypack:zone1 0 60 0 100 80 100
/camera Changes a player's camera perspective (cinematic modes) /camera @p set minecraft:free
/scriptevent Sends an event to Bedrock scripts (Script API) /scriptevent mypack:start

/hud @a hide all hides the entire interface: no more hearts, no hunger bar, no hotbar. Use /hud @a reset to show everything again. /inputpermission lets you block a player's movement (for a cutscene), disable attacking (non-combat zone), or forbid camera rotation.

Removed or obsolete commands

Several commands have been removed over versions. If a guide still mentions them, it is outdated.

Removed command Version removed Replaced by
/testfor Java 1.13 /execute if entity
/testforblock Java 1.13 /execute if block
/testforblocks Java 1.13 /execute if blocks
/blockdata Java 1.13 /data merge block
/entitydata Java 1.13 /data merge entity
/replaceitem Java 1.17 /item replace (remains on Bedrock)
/achievement Java 1.12 /advancement
/stats Java 1.13 /execute store
/toggledownfall Java 1.13 /weather (remains on Bedrock)
/mixer Bedrock 1.2 Removed (end of the Mixer service)

Key Java vs Bedrock differences

Aspect Java Edition Bedrock Edition
Permission system 4 OP levels (1-4) 3 roles (visitor, member, operator) + cheats required
Native ban ✅ /ban, /ban-ip, /pardon ❌ No ban command
Game modes Names only (creative) Names or numbers (creative or 1)
Distance selector distance=..10 r=10
Limit selector limit=1,sort=nearest c=1
NBT data ✅ /data (read/write) ❌ No NBT access
World border ✅ /worldborder ❌ No native border
Always-loaded zones /forceload /tickingarea
Saving /save-all (one command) /save hold + query + resume (three steps)
Functions/datapacks ✅ /function, /datapack, /schedule Behavior packs (different system)
Infinite effects ✅ "Infinite" duration supported ❌ No infinite duration
Item prefix minecraft:stone stone (optional prefix)
Day/night lock Via /gamerule doDaylightCycle false /daylock or /alwaysday
HUD control ❌ ✅ /hud
Player input control ❌ ✅ /inputpermission

Frequently Asked Questions

How do I enable commands in a singleplayer world?

On Java, enable "Allow Commands" when creating the world, or open the world to LAN (Pause menu, Open to LAN) and tick "Allow Cheats". On Bedrock, enable "Allow Cheats" in the world settings. Warning: on Bedrock, enabling cheats permanently disables achievements for that world.

Why does /gamemode 1 not work on Java?

Java has not accepted game mode numbers since version 1.13. Use the names: /gamemode creative, /gamemode survival, /gamemode adventure, /gamemode spectator. Bedrock still accepts both forms (names and numbers).

How do I ban a player on Bedrock?

Bedrock has no native /ban command. You can use the whitelist (/allowlist on then /allowlist add for each authorized player) to keep undesirables from connecting. Otherwise, third-party add-ons or server management tools add ban commands.

Do commands work in command blocks?

Yes, on both editions. Command blocks run commands without the slash and with maximum permissions. They can be enabled in server.properties (Java: enable-command-block=true) or in the world settings (Bedrock). Command blocks do not need OP status because they run at the server level.

How do I find the exact syntax of a command on my version?

Type the command in chat and autocomplete (Tab key on Java, automatic suggestions on Bedrock) will display the exact syntax supported by your version. You can also use /help CommandName to get the description and full syntax.

Which commands should I use for an events/minigames server?

The key commands are /scoreboard (kill counters, objectives), /tag (marking players by team), /execute (conditional logic), /title (on-screen text), /bossbar (progress bars, Java only), /team (team management with colors, Java only), and /gamerule (disabling regeneration, PvP, etc.). Command blocks or datapacks let you automate these commands without manual intervention.

Discover Minecraft servers

Find your next Minecraft server in our ranking.

View the Minecraft ranking

Reviews

No comments yet.

Comment

To comment, you must be logged in.