Skip to content

Minecraft Admin & Console Commands

Complete reference for Minecraft server admin commands, operator permissions, whitelist management, and server console usage.

HostedGG Team
Author · Updated
Verifiedfor Current version
Checked by HostedGG Team on Jun 19, 2026
Updated 4 months agoHostedGG Team

Minecraft Server Commands

As a server admin, you have access to powerful commands for managing players, the world, and gameplay. This guide covers all essential admin commands.

Setting Up Operators (OPs)

Operators are players with admin permissions. Grant OP status from the server console:

sh
op <username>

Remove OP status:

sh
deop <username>
Intel

Tip: Use a permissions plugin like LuckPerms instead of OP for granular control. OP gives full server access, which isn't ideal for larger servers.

OP Permission Levels

LevelAccess
1Bypass spawn protection
2Use /clear, /difficulty, /gamemode, etc.
3Use /ban, /kick, /op
4Use /stop, /save-all, full access

Set the default OP level in server.properties:

properties
op-permission-level=4

Player Management Commands

Moderation

CommandDescription
/kick <player> [reason]Disconnect a player
/ban <player> [reason]Permanently ban a player
/ban-ip <ip>Ban an IP address
/pardon <player>Unban a player
/pardon-ip <ip>Unban an IP address
/banlistView all banned players

Whitelist

CommandDescription
/whitelist onEnable whitelist (only listed players can join)
/whitelist offDisable whitelist
/whitelist add <player>Add a player to the whitelist
/whitelist remove <player>Remove from whitelist
/whitelist listShow all whitelisted players

Enable whitelist enforcement in server.properties:

properties
white-list=true
enforce-whitelist=true

Teleportation

CommandDescription
/tp <player1> <player2>Teleport player1 to player2
/tp <player> <x> <y> <z>Teleport to coordinates
/tp @a <x> <y> <z>Teleport all players to coordinates

World Management Commands

Core Commands

CommandDescription
/save-allForce a world save
/save-offDisable auto-save (for manual backups)
/save-onRe-enable auto-save
/stopStop the server gracefully

Time & Weather

CommandDescription
/time set daySet to daytime (1000 ticks)
/time set nightSet to night (13000 ticks)
/time set <ticks>Set to specific time
/weather clearClear weather
/weather rainStart rain
/weather thunderStart thunderstorm

Game Rules

CommandDefaultDescription
/gamerule keepInventory truefalseKeep items on death
/gamerule doDaylightCycle falsetrueStop time progression
/gamerule doFireTick falsetruePrevent fire spread
/gamerule doMobSpawning falsetrueDisable mob spawning
/gamerule mobGriefing falsetruePrevent creeper/enderman damage
/gamerule pvp falsetrueDisable PvP
/gamerule announceAdvancements falsetrueHide advancement messages
/gamerule playersSleepingPercentage 50100% of players needed to skip night

Difficulty & Gamemode

CommandDescription
/difficulty peacefulNo hostile mobs
/difficulty easyLow damage, no hunger drain to death
/difficulty normalStandard difficulty
/difficulty hardMaximum damage, zombies break doors
/gamemode survival <player>Survival mode
/gamemode creative <player>Creative mode
/gamemode spectator <player>Spectator mode
/gamemode adventure <player>Adventure mode

Item & Player Commands

Give Items

sh
/give <player> <item> [amount]

Examples:

sh
/give Steve diamond_sword 1
/give Steve netherite_ingot 64
/give @a cooked_beef 32          ← gives to all players
/give @r diamond 1               ← gives to random player

Target Selectors

SelectorDescription
@pNearest player
@aAll players
@rRandom player
@eAll entities
@sYourself (command executor)

Experience

CommandDescription
/xp add <player> 100Add 100 XP points
/xp add <player> 5 levelsAdd 5 XP levels
/xp set <player> 0Reset XP to 0
/xp query <player> levelsCheck player's level

Effects

sh
/effect give <player> <effect> [seconds] [amplifier]

Examples:

sh
/effect give Steve speed 600 1           ← Speed II for 10 minutes
/effect give @a night_vision 99999 0     ← Permanent night vision for all
/effect clear Steve                      ← Remove all effects from Steve

Server Console Commands

These commands work only from the server console (not in-game):

CommandDescription
stopGracefully stop the server
save-allForce save
listShow online players
say <message>Broadcast a server message
op <player>Grant operator status
deop <player>Remove operator status

Using the HostedGG Console

  1. Open your server dashboard
  2. Go to the Console tab
  3. Type commands without the / prefix
  4. Press Enter to execute

World Border

CommandDescription
/worldborder set <size>Set border diameter in blocks
/worldborder center <x> <z>Set border center
/worldborder add <size> <time>Expand border over time
/worldborder warning distance 10Warning distance
/worldborder warning time 15Warning time in seconds

Example — Set a 10,000×10,000 world centered on spawn:

sh
/worldborder center 0 0
/worldborder set 10000

Useful Command Blocks

For automated server management, use command blocks (creative mode or /give @s command_block):

Auto-Clear Lag

Clear dropped items every 5 minutes:

sh
/kill @e[type=item,nbt={Age:1200s}]

Welcome Message

On a repeating command block:

sh
/title @a[scores={loginTimer=1}] title {"text":"Welcome!","color":"gold"}

Best Practices

  1. Use LuckPerms over OP — OP is all-or-nothing; permissions are granular
  2. Don't give OP to players — Even trusted players should use permission groups
  3. Test commands on yourself first — Especially /kill, /tp, and world-altering commands
  4. Save before experimenting — Run /save-all before risky commands
  5. Use the console for server management — Game chat commands can be seen by players

Next Steps

Help verify this page

Tested this recently? Send a quick accuracy signal for editors.

Sign in to report accuracy

Help improve HostedGG

Know this game? Join our community of contributors.

Discussion

Sign in to join the discussion.

Loading discussion...