How to Give Ops in a Minecraft Server | Basic Admin Commands

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:

  1. Log in to the server console.
  2. 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:

  1. If you open a Minecraft server with VisperHost, you can easily enable admin commands in the Settings menu by turning on Allow Cheat.
  2. 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:

CommandDescription:Example:
/advancementDelete or check the player’s progress.Advancement grant: Give Steve everything.
/attributeInquire about, add, delete, or configure the attributes of an entity./attribute Steve minecraft:generic.max_health base set 40
/banBan the player from the server.Ban Steve
/ban-ipBan the IP address from the server./ban-ip 192.168.1.1
/banlistDisplay a list of banned players or IPs./banlist players
/bossbarCreate or edit the boss bar./bossbar add mybossbar “Boss Health”
/clearClear items from the player’s inventory./clear Steve
/cloneCopy the blog from one place to another./clone 0 0 0 10 10 10 20 20 20
/damageCauses damage to the specified entity./damage Steve 5
/dataRead or modify NBT data of blocks and entities/data get entity Steve
/datapackManage Loaded Datapacks/datapack enable mypack
/debugStart or stop debugging./debug start
/defaultgamemodeSet the world’s default game mode./defaultgamemode creative
/deopCancel OP status from player/deop Steve
/difficultySet the difficulty level.Difficulty: Hard
/effectAdd or remove effect status./effect give Steve speed 60 1
/enchantCast a spell on the item you are holding./enchant Steve sharpness 5
/executeUsed to execute other commands./execute as Steve run say Hello
/experienceNickname for /xp: Add or remove player experience points/experience add Steve 10 levels
/fillFill the area with designated blocks./fill 0 0 0 10 10 10 stone
/fillbiomeFill the area with the specified biome./fillbiome 0 0 0 10 10 10 plains
/forceloadForce loading or unloading chunks/forceload add 0 0
/functionRun the specified function./function mypack:setup
/gamemodeSet the player’s game mode/gamemode survival Steve
/gameruleSet up or inquire about the game rules./gamerule keepInventory true
/giveGive the item to the player./give Steve apple 64
/helpThe placeholder /? is used to indicate how to use various commands./help
/itemManage items in the inventory./item replace entity Steve weapon.mainhand diamond_sword
/jfrStart or stop JFR profiling./jfr start
/kickKick the player off the server./kick Steve
/killKill the specified entity./kill Steve
/listDisplay a list of players who are online./list
/locateSearch for the nearest structure or biome./locate village
/lootDrop an item from your inventory onto the ground./loot spawn ~ ~ ~ loot myloot
/meDisplay a message related to the sender./me is building a house
/msgSend a private message to another player./msg Steve Hello
/opGrant OP rights to the player./op Steve
Pardon.Remove player from the banned list.Pardon, Steve.
/pardon-ipRemove IP from the ban list/pardon-ip 192.168.1.1
/particleCreating Particles in a Game/particle smoke ~ ~ ~
/perfRecord game performance data for 10 seconds./perf start
/placePlace the configured feature or structure at the specified location./place structure village
/playsoundPlay the specified sound./playsound minecraft:block.note_block.harp master Steve
PublishOpen the single-player world for network players to joinPublish
/randomRandom Value Generation or Random Number Sequence Control/random roll 1 6
/recipeGrant or remove player item formulas./recipe give Steve minecraft:bread
/reloadLoad new data for loot tables, advancements, and functions./reload
/returnControl the flow of functions and return values (Java Edition only)/return 1
/rideAllow one entity to ride another entity or stop the riding./ride Steve mount horse
/save-allWrite server data to disk/save-all
/save-offTurn off the automatic recording system./save-off
/save-onEnable the automatic recording system./save-on
/sayDisplay the message to all players.Hello players!
/scheduleSet a delay for the function to activate/schedule function mypack:task 10s
/scoreboardManage the scoreboard and player scores./scoreboard objectives add kills dummy
/seedShow World Seed/seed
/setblockChange the block at the specified position./setblock ~ ~ ~ stone
/setidletimeoutSet a time limit for inactive players to be kicked out./setidletimeout 10
/setworldspawnSet the Earth’s birth point/setworldspawn
/spawnpointSet the spawn point for players./spawnpoint Steve
/spectateAllows spectators in spectator mode to view entities/spectate Steve creeper
/spreadplayersTeleport the player to a random location./spreadplayers 0 0 10 50 false @a
/stopStop the server operation./stop
/stopsoundStop playing the sound./stopsound Steve master
/summonInvoke Entity/summon zombie
/tagManage entity tags/tag Steve add admin
/teamManage the player’s team./team add Red
/teammsgSend a message to the affiliated team./teammsg Go team!
/teleportAlias for /tp teleport entity/teleport Steve Alex
/tellSend a private message to another player./tell Steve Hi!
/tellrawSend a JSON message to the player./tellraw Steve {“text”:”Welcome!”}
/timeChange or inquire about the world time./time set noon
/tickStop or resume the game time and manage the speed of time./tick freeze
/titleDisplay a message on the player’s screen./title Steve title Welcome
/tmAlias for /teammsg: Send a message to the team/tm Let’s win!
/tpAlias for /teleport Teleport entity/tp Steve 100 64 100
/triggerEnable the trigger for the player./trigger exampleTrigger
/wNickname for /tell Send private message/w Steve Hey
/weatherChange the weather in the game./weather clear
/whitelistManage the server whitelist./whitelist add Steve
/worldborderManage the boundaries of the world./worldborder set 1000
/xpIncrease or decrease the player’s experience points./xp add Steve 5 levels

Admin commands in Minecraft Bedrock Edition:

CommandDescription:Example:
/?This is an alias for /help used to display instructions for various commands./?
/abilityGrant or revoke a player’s privileges/ability Steve fly true
/alwaysdayThe alias “/daylock” is used to lock or unlock the day-night cycle./alwaysday true
/cameraCustom camera view switching and screen fading (not yet added to the game)/camera
/camerashakeUse to activate the camera shake effect./camerashake add Steve 5 2
/changingsettingChange server settings while running/changesetting allow-cheats true
/clearClear items from the player’s inventory./clear Steve
/clearspawnpointDelete the designated spawn point./clearspawnpoint
/cloneCopy the blog from one place to another./clone 0 0 0 10 10 10 20 20 20
/connectConnect to the websocket server (Education Edition only)/connect server.example.com
/damageCauses damage to the specified entity./damage Steve 5
/daylockThe alias for /alwaysday is used to lock or unlock the day-night cycle./daylock false
/dedicatedwsserverConnect to a specific websocket server/dedicatedwsserver server.example.com
/deopCancel OP status from player/deop Steve
/dialogueOpen the NPC dialogue box for players./dialogue open npc1 Steve
/difficultySet the difficulty level.Difficulty: Hard
/effectAdd or remove effect status./effect give Steve speed 60 1
/enchantCast a spell on the item you are holding./enchant Steve sharpness 5
/eventTrigger the event specified on the entity./event entity Steve custom:event
/executeUsed to execute other commands./execute as Steve run say Hello
/fillFill the area with designated blocks./fill 0 0 0 10 10 10 stone
/fogManage Player Fog Settings/fog push Steve minecraft:fog_the_end
/functionRun the specified function./function mypack:setup
/gamemodeSet the player’s game mode/gamemode survival Steve
/gameruleSet up or inquire about the game rules./gamerule keepInventory true
/gametestUse to test the GameTest feature./gametest run mytest
/giveGive the item to the player./give Steve apple 64
/helpThe placeholder /? is used to indicate how to use various commands./help
/immutableworldSet the world in a state of immutable change./immutableworld true
/kickKick the player off the server./kick Steve
/killKill the specified entity./kill Steve
/listDisplay a list of players who are online./list
/locateSearch for the nearest structure or biome./locate village
/lootDrop an item from your inventory onto the ground./loot spawn ~ ~ ~ loot myloot
/meDisplay a message related to the sender./me is building a house
/mobeventTurn Monster Activities On or Off/mobevent minecraft:pillager_patrols false
/msgSend a private message to another player./msg Steve Hello
/musicControl music playback in the game/music play record.cat
/opGrant OP rights to the player./op Steve
/opsThe alias of /permission is used for loading and reassigning permissions./ops reload
/particleCreating Particles in a Game/particle smoke ~ ~ ~
/permission/ops alias: load and grant new privileges/permission reload
/playanimationPlay animation once/playanimation Steve animation.wave
/playsoundPlay the specified sound./playsound minecraft:block.note_block.harp master Steve
/recipeGrant or remove player item formulas./recipe give Steve minecraft:bread
/reloadLoad new data for loot tables, advancements, and functions./reload
/replaceitemChange item in inventory (Cancelled)/replaceitem entity Steve slot.weapon.mainhand stone
/rideAllow one entity to ride another entity or stop the riding./ride Steve mount horse
/savePrepare for data backup or manage status/save query
/sayDisplay the message to all players.Hello players!
/scheduleSet a delay for the function to activate/schedule function mypack:task 10s
/scoreboardManage the scoreboard and player scores./scoreboard objectives add kills dummy
/script(Additional information required)/script
/scriptevent(Additional information required)/scriptevent
/setblockChange the block at the specified position./setblock ~ ~ ~ stone
/setmaxplayersSet the maximum number of players on the server./setmaxplayers 20
/setworldspawnSet the Earth’s birth point/setworldspawn
/spawnpointSet the spawn point for players./spawnpoint Steve
/spreadplayersTeleport the player to a random location./spreadplayers 0 0 10 50 false @a
/stopStop the server operation./stop
/stopsoundStop playing the sound./stopsound Steve master
/structureRecord or save the structure without using a structure block./structure load mystructure ~ ~ ~
/summonInvoke Entity/summon zombie
/tagManage entity tags/tag Steve add admin
/teleportAlias for /tp teleport entity/teleport Steve Alex
/tellSend a private message to another player./tell Steve Hi!
/tellrawSend a JSON message to the player./tellraw Steve {“text”:”Welcome!”}
/testforCount entities that meet the criteria (cancelled)/testfor @e[type=zombie]
/testforblockCheck if there is a block at the position (cancelled)./testforblock ~ ~-1 ~ grass
/testforblocksCheck whether the block between two areas matches (deactivated)./testforblocks 0 0 0 5 5 5 10 10 10
/tickingareaAdd, delete, or display ticking area/tickingarea add circle ~ ~ ~ 4
/timeChange or inquire about the world time./time set noon
/tickStop or resume the game time and manage the speed of time./tick freeze
/titleDisplay a message on the player’s screen./title Steve title Welcome
/titlerawDisplay text on the screen using JSON/titleraw Steve {“text”:”Hello”}
/toggledownfallTurn rain on or off (deactivated)/toggledownfall
/tpAlias for /teleport Teleport entity/tp Steve 100 64 100
/volumeareaAdd, delete, or display the volume area./volumearea add ~ ~ ~ 10 10 10
/wNickname for /tell Send private message/w Steve Hey
/wbThe alias for /worldbuilder allows limited block editing./wb
/weatherChange the weather in the game./weather clear
/whitelistManage the server whitelist./whitelist add Steve
/worldbuilderThe alias /wb allows limited block editing./worldbuilder
/wsserverConnect to the websocket server/wsserver server.example.com
/xpIncrease or decrease the player’s experience points./xp add Steve 5 levels

Source: https://minecraft.fandom.com/wiki/Commands