Using admin commands in a Minecraft server is essential for system administrators, as it helps manage the game world more conveniently and efficiently.
How to give the op permission to enable admin commands
Before you can use admin commands, you must first have OP (Operator) privileges. To do so, follow these steps:
How to Give Op to a Player in Minecraft Java Edition Server:

- Log in to the server console.
- In the console, type the command op, followed by a space and the in-game character name.
How to enable admin commands for Minecraft Bedrock Edition servers:

- If you open a Minecraft server with VisperHost, you can easily enable admin commands in the Settings menu by turning on Allow Cheat.
- If you want to open a server yourself, you can do so as follows:
- Go to the server file.
- Go to the file server.properties
- Set allow-cheats to true as shown in the image below.

After obtaining OP status, players can use various commands by opening the Chat window and typing the / symbol followed by the desired command.
Admin commands in Minecraft Java Edition:
| Command | Description: | Example: |
|---|---|---|
| /advancement | Delete or check the player’s progress. | Advancement grant: Give Steve everything. |
| /attribute | Inquire about, add, delete, or configure the attributes of an entity. | /attribute Steve minecraft:generic.max_health base set 40 |
| /ban | Ban the player from the server. | Ban Steve |
| /ban-ip | Ban the IP address from the server. | /ban-ip 192.168.1.1 |
| /banlist | Display a list of banned players or IPs. | /banlist players |
| /bossbar | Create or edit the boss bar. | /bossbar add mybossbar “Boss Health” |
| /clear | Clear items from the player’s inventory. | /clear Steve |
| /clone | Copy the blog from one place to another. | /clone 0 0 0 10 10 10 20 20 20 |
| /damage | Causes damage to the specified entity. | /damage Steve 5 |
| /data | Read or modify NBT data of blocks and entities | /data get entity Steve |
| /datapack | Manage Loaded Datapacks | /datapack enable mypack |
| /debug | Start or stop debugging. | /debug start |
| /defaultgamemode | Set the world’s default game mode. | /defaultgamemode creative |
| /deop | Cancel OP status from player | /deop Steve |
| /difficulty | Set the difficulty level. | Difficulty: Hard |
| /effect | Add or remove effect status. | /effect give Steve speed 60 1 |
| /enchant | Cast a spell on the item you are holding. | /enchant Steve sharpness 5 |
| /execute | Used to execute other commands. | /execute as Steve run say Hello |
| /experience | Nickname for /xp: Add or remove player experience points | /experience add Steve 10 levels |
| /fill | Fill the area with designated blocks. | /fill 0 0 0 10 10 10 stone |
| /fillbiome | Fill the area with the specified biome. | /fillbiome 0 0 0 10 10 10 plains |
| /forceload | Force loading or unloading chunks | /forceload add 0 0 |
| /function | Run the specified function. | /function mypack:setup |
| /gamemode | Set the player’s game mode | /gamemode survival Steve |
| /gamerule | Set up or inquire about the game rules. | /gamerule keepInventory true |
| /give | Give the item to the player. | /give Steve apple 64 |
| /help | The placeholder /? is used to indicate how to use various commands. | /help |
| /item | Manage items in the inventory. | /item replace entity Steve weapon.mainhand diamond_sword |
| /jfr | Start or stop JFR profiling. | /jfr start |
| /kick | Kick the player off the server. | /kick Steve |
| /kill | Kill the specified entity. | /kill Steve |
| /list | Display a list of players who are online. | /list |
| /locate | Search for the nearest structure or biome. | /locate village |
| /loot | Drop an item from your inventory onto the ground. | /loot spawn ~ ~ ~ loot myloot |
| /me | Display a message related to the sender. | /me is building a house |
| /msg | Send a private message to another player. | /msg Steve Hello |
| /op | Grant OP rights to the player. | /op Steve |
| Pardon. | Remove player from the banned list. | Pardon, Steve. |
| /pardon-ip | Remove IP from the ban list | /pardon-ip 192.168.1.1 |
| /particle | Creating Particles in a Game | /particle smoke ~ ~ ~ |
| /perf | Record game performance data for 10 seconds. | /perf start |
| /place | Place the configured feature or structure at the specified location. | /place structure village |
| /playsound | Play the specified sound. | /playsound minecraft:block.note_block.harp master Steve |
| Publish | Open the single-player world for network players to join | Publish |
| /random | Random Value Generation or Random Number Sequence Control | /random roll 1 6 |
| /recipe | Grant or remove player item formulas. | /recipe give Steve minecraft:bread |
| /reload | Load new data for loot tables, advancements, and functions. | /reload |
| /return | Control the flow of functions and return values (Java Edition only) | /return 1 |
| /ride | Allow one entity to ride another entity or stop the riding. | /ride Steve mount horse |
| /save-all | Write server data to disk | /save-all |
| /save-off | Turn off the automatic recording system. | /save-off |
| /save-on | Enable the automatic recording system. | /save-on |
| /say | Display the message to all players. | Hello players! |
| /schedule | Set a delay for the function to activate | /schedule function mypack:task 10s |
| /scoreboard | Manage the scoreboard and player scores. | /scoreboard objectives add kills dummy |
| /seed | Show World Seed | /seed |
| /setblock | Change the block at the specified position. | /setblock ~ ~ ~ stone |
| /setidletimeout | Set a time limit for inactive players to be kicked out. | /setidletimeout 10 |
| /setworldspawn | Set the Earth’s birth point | /setworldspawn |
| /spawnpoint | Set the spawn point for players. | /spawnpoint Steve |
| /spectate | Allows spectators in spectator mode to view entities | /spectate Steve creeper |
| /spreadplayers | Teleport the player to a random location. | /spreadplayers 0 0 10 50 false @a |
| /stop | Stop the server operation. | /stop |
| /stopsound | Stop playing the sound. | /stopsound Steve master |
| /summon | Invoke Entity | /summon zombie |
| /tag | Manage entity tags | /tag Steve add admin |
| /team | Manage the player’s team. | /team add Red |
| /teammsg | Send a message to the affiliated team. | /teammsg Go team! |
| /teleport | Alias for /tp teleport entity | /teleport Steve Alex |
| /tell | Send a private message to another player. | /tell Steve Hi! |
| /tellraw | Send a JSON message to the player. | /tellraw Steve {“text”:”Welcome!”} |
| /time | Change or inquire about the world time. | /time set noon |
| /tick | Stop or resume the game time and manage the speed of time. | /tick freeze |
| /title | Display a message on the player’s screen. | /title Steve title Welcome |
| /tm | Alias for /teammsg: Send a message to the team | /tm Let’s win! |
| /tp | Alias for /teleport Teleport entity | /tp Steve 100 64 100 |
| /trigger | Enable the trigger for the player. | /trigger exampleTrigger |
| /w | Nickname for /tell Send private message | /w Steve Hey |
| /weather | Change the weather in the game. | /weather clear |
| /whitelist | Manage the server whitelist. | /whitelist add Steve |
| /worldborder | Manage the boundaries of the world. | /worldborder set 1000 |
| /xp | Increase or decrease the player’s experience points. | /xp add Steve 5 levels |
Admin commands in Minecraft Bedrock Edition:
| Command | Description: | Example: |
|---|---|---|
| /? | This is an alias for /help used to display instructions for various commands. | /? |
| /ability | Grant or revoke a player’s privileges | /ability Steve fly true |
| /alwaysday | The alias “/daylock” is used to lock or unlock the day-night cycle. | /alwaysday true |
| /camera | Custom camera view switching and screen fading (not yet added to the game) | /camera |
| /camerashake | Use to activate the camera shake effect. | /camerashake add Steve 5 2 |
| /changingsetting | Change server settings while running | /changesetting allow-cheats true |
| /clear | Clear items from the player’s inventory. | /clear Steve |
| /clearspawnpoint | Delete the designated spawn point. | /clearspawnpoint |
| /clone | Copy the blog from one place to another. | /clone 0 0 0 10 10 10 20 20 20 |
| /connect | Connect to the websocket server (Education Edition only) | /connect server.example.com |
| /damage | Causes damage to the specified entity. | /damage Steve 5 |
| /daylock | The alias for /alwaysday is used to lock or unlock the day-night cycle. | /daylock false |
| /dedicatedwsserver | Connect to a specific websocket server | /dedicatedwsserver server.example.com |
| /deop | Cancel OP status from player | /deop Steve |
| /dialogue | Open the NPC dialogue box for players. | /dialogue open npc1 Steve |
| /difficulty | Set the difficulty level. | Difficulty: Hard |
| /effect | Add or remove effect status. | /effect give Steve speed 60 1 |
| /enchant | Cast a spell on the item you are holding. | /enchant Steve sharpness 5 |
| /event | Trigger the event specified on the entity. | /event entity Steve custom:event |
| /execute | Used to execute other commands. | /execute as Steve run say Hello |
| /fill | Fill the area with designated blocks. | /fill 0 0 0 10 10 10 stone |
| /fog | Manage Player Fog Settings | /fog push Steve minecraft:fog_the_end |
| /function | Run the specified function. | /function mypack:setup |
| /gamemode | Set the player’s game mode | /gamemode survival Steve |
| /gamerule | Set up or inquire about the game rules. | /gamerule keepInventory true |
| /gametest | Use to test the GameTest feature. | /gametest run mytest |
| /give | Give the item to the player. | /give Steve apple 64 |
| /help | The placeholder /? is used to indicate how to use various commands. | /help |
| /immutableworld | Set the world in a state of immutable change. | /immutableworld true |
| /kick | Kick the player off the server. | /kick Steve |
| /kill | Kill the specified entity. | /kill Steve |
| /list | Display a list of players who are online. | /list |
| /locate | Search for the nearest structure or biome. | /locate village |
| /loot | Drop an item from your inventory onto the ground. | /loot spawn ~ ~ ~ loot myloot |
| /me | Display a message related to the sender. | /me is building a house |
| /mobevent | Turn Monster Activities On or Off | /mobevent minecraft:pillager_patrols false |
| /msg | Send a private message to another player. | /msg Steve Hello |
| /music | Control music playback in the game | /music play record.cat |
| /op | Grant OP rights to the player. | /op Steve |
| /ops | The alias of /permission is used for loading and reassigning permissions. | /ops reload |
| /particle | Creating Particles in a Game | /particle smoke ~ ~ ~ |
| /permission | /ops alias: load and grant new privileges | /permission reload |
| /playanimation | Play animation once | /playanimation Steve animation.wave |
| /playsound | Play the specified sound. | /playsound minecraft:block.note_block.harp master Steve |
| /recipe | Grant or remove player item formulas. | /recipe give Steve minecraft:bread |
| /reload | Load new data for loot tables, advancements, and functions. | /reload |
| /replaceitem | Change item in inventory (Cancelled) | /replaceitem entity Steve slot.weapon.mainhand stone |
| /ride | Allow one entity to ride another entity or stop the riding. | /ride Steve mount horse |
| /save | Prepare for data backup or manage status | /save query |
| /say | Display the message to all players. | Hello players! |
| /schedule | Set a delay for the function to activate | /schedule function mypack:task 10s |
| /scoreboard | Manage the scoreboard and player scores. | /scoreboard objectives add kills dummy |
| /script | (Additional information required) | /script |
| /scriptevent | (Additional information required) | /scriptevent |
| /setblock | Change the block at the specified position. | /setblock ~ ~ ~ stone |
| /setmaxplayers | Set the maximum number of players on the server. | /setmaxplayers 20 |
| /setworldspawn | Set the Earth’s birth point | /setworldspawn |
| /spawnpoint | Set the spawn point for players. | /spawnpoint Steve |
| /spreadplayers | Teleport the player to a random location. | /spreadplayers 0 0 10 50 false @a |
| /stop | Stop the server operation. | /stop |
| /stopsound | Stop playing the sound. | /stopsound Steve master |
| /structure | Record or save the structure without using a structure block. | /structure load mystructure ~ ~ ~ |
| /summon | Invoke Entity | /summon zombie |
| /tag | Manage entity tags | /tag Steve add admin |
| /teleport | Alias for /tp teleport entity | /teleport Steve Alex |
| /tell | Send a private message to another player. | /tell Steve Hi! |
| /tellraw | Send a JSON message to the player. | /tellraw Steve {“text”:”Welcome!”} |
| /testfor | Count entities that meet the criteria (cancelled) | /testfor @e[type=zombie] |
| /testforblock | Check if there is a block at the position (cancelled). | /testforblock ~ ~-1 ~ grass |
| /testforblocks | Check whether the block between two areas matches (deactivated). | /testforblocks 0 0 0 5 5 5 10 10 10 |
| /tickingarea | Add, delete, or display ticking area | /tickingarea add circle ~ ~ ~ 4 |
| /time | Change or inquire about the world time. | /time set noon |
| /tick | Stop or resume the game time and manage the speed of time. | /tick freeze |
| /title | Display a message on the player’s screen. | /title Steve title Welcome |
| /titleraw | Display text on the screen using JSON | /titleraw Steve {“text”:”Hello”} |
| /toggledownfall | Turn rain on or off (deactivated) | /toggledownfall |
| /tp | Alias for /teleport Teleport entity | /tp Steve 100 64 100 |
| /volumearea | Add, delete, or display the volume area. | /volumearea add ~ ~ ~ 10 10 10 |
| /w | Nickname for /tell Send private message | /w Steve Hey |
| /wb | The alias for /worldbuilder allows limited block editing. | /wb |
| /weather | Change the weather in the game. | /weather clear |
| /whitelist | Manage the server whitelist. | /whitelist add Steve |
| /worldbuilder | The alias /wb allows limited block editing. | /worldbuilder |
| /wsserver | Connect to the websocket server | /wsserver server.example.com |
| /xp | Increase or decrease the player’s experience points. | /xp add Steve 5 levels |
Source: https://minecraft.fandom.com/wiki/Commands

ไทย