Minecraft Admin & Console Commands
Complete reference for Minecraft server admin commands, operator permissions, whitelist management, and server console usage.
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:
op <username>Remove OP status:
deop <username>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
| Level | Access |
|---|---|
| 1 | Bypass spawn protection |
| 2 | Use /clear, /difficulty, /gamemode, etc. |
| 3 | Use /ban, /kick, /op |
| 4 | Use /stop, /save-all, full access |
Set the default OP level in server.properties:
op-permission-level=4Player Management Commands
Moderation
| Command | Description |
|---|---|
/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 |
/banlist | View all banned players |
Whitelist
| Command | Description |
|---|---|
/whitelist on | Enable whitelist (only listed players can join) |
/whitelist off | Disable whitelist |
/whitelist add <player> | Add a player to the whitelist |
/whitelist remove <player> | Remove from whitelist |
/whitelist list | Show all whitelisted players |
Enable whitelist enforcement in server.properties:
white-list=true
enforce-whitelist=trueTeleportation
| Command | Description |
|---|---|
/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
| Command | Description |
|---|---|
/save-all | Force a world save |
/save-off | Disable auto-save (for manual backups) |
/save-on | Re-enable auto-save |
/stop | Stop the server gracefully |
Time & Weather
| Command | Description |
|---|---|
/time set day | Set to daytime (1000 ticks) |
/time set night | Set to night (13000 ticks) |
/time set <ticks> | Set to specific time |
/weather clear | Clear weather |
/weather rain | Start rain |
/weather thunder | Start thunderstorm |
Game Rules
| Command | Default | Description |
|---|---|---|
/gamerule keepInventory true | false | Keep items on death |
/gamerule doDaylightCycle false | true | Stop time progression |
/gamerule doFireTick false | true | Prevent fire spread |
/gamerule doMobSpawning false | true | Disable mob spawning |
/gamerule mobGriefing false | true | Prevent creeper/enderman damage |
/gamerule pvp false | true | Disable PvP |
/gamerule announceAdvancements false | true | Hide advancement messages |
/gamerule playersSleepingPercentage 50 | 100 | % of players needed to skip night |
Difficulty & Gamemode
| Command | Description |
|---|---|
/difficulty peaceful | No hostile mobs |
/difficulty easy | Low damage, no hunger drain to death |
/difficulty normal | Standard difficulty |
/difficulty hard | Maximum 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
/give <player> <item> [amount]Examples:
/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 playerTarget Selectors
| Selector | Description |
|---|---|
@p | Nearest player |
@a | All players |
@r | Random player |
@e | All entities |
@s | Yourself (command executor) |
Experience
| Command | Description |
|---|---|
/xp add <player> 100 | Add 100 XP points |
/xp add <player> 5 levels | Add 5 XP levels |
/xp set <player> 0 | Reset XP to 0 |
/xp query <player> levels | Check player's level |
Effects
/effect give <player> <effect> [seconds] [amplifier]Examples:
/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 SteveServer Console Commands
These commands work only from the server console (not in-game):
| Command | Description |
|---|---|
stop | Gracefully stop the server |
save-all | Force save |
list | Show online players |
say <message> | Broadcast a server message |
op <player> | Grant operator status |
deop <player> | Remove operator status |
Using the HostedGG Console
- Open your server dashboard
- Go to the Console tab
- Type commands without the
/prefix - Press Enter to execute
World Border
| Command | Description |
|---|---|
/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 10 | Warning distance |
/worldborder warning time 15 | Warning time in seconds |
Example — Set a 10,000×10,000 world centered on spawn:
/worldborder center 0 0
/worldborder set 10000Useful 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:
/kill @e[type=item,nbt={Age:1200s}]Welcome Message
On a repeating command block:
/title @a[scores={loginTimer=1}] title {"text":"Welcome!","color":"gold"}Best Practices
- Use LuckPerms over OP — OP is all-or-nothing; permissions are granular
- Don't give OP to players — Even trusted players should use permission groups
- Test commands on yourself first — Especially
/kill,/tp, and world-altering commands - Save before experimenting — Run
/save-allbefore risky commands - Use the console for server management — Game chat commands can be seen by players
Next Steps
- Manage your worlds and backups
- Install permission and management plugins
- Optimize server performance
Related Blog Posts
Related Articles
Help verify this page
Tested this recently? Send a quick accuracy signal for editors.
Help improve HostedGG
Know this game? Join our community of contributors.
Discussion
Sign in to join the discussion.
Loading discussion...