Every Minecraft server admin needs a solid command reference. Whether you are running a small SMP or managing a large community server, knowing the right console commands saves time and keeps things running smoothly.
This cheat sheet covers every command you will regularly use — organized by category so you can find what you need fast. All commands work directly in your server console without the / prefix.
Player Management
The commands you will use most. Managing who is on your server and what they can do.
| Command | What It Does | Example |
|---|---|---|
list | Show online players and count | list |
kick <player> [reason] | Remove a player from the server | kick Steve Griefing |
ban <player> [reason] | Permanently ban a player | ban Steve Griefing spawn |
ban-ip <ip> | Ban an IP address | ban-ip 192.168.1.100 |
pardon <player> | Unban a player | pardon Steve |
pardon-ip <ip> | Unban an IP address | pardon-ip 192.168.1.100 |
banlist | Show all banned players | banlist |
whitelist add <player> | Add player to whitelist | whitelist add Steve |
whitelist remove <player> | Remove from whitelist | whitelist remove Steve |
whitelist list | Show whitelisted players | whitelist list |
whitelist on | Enable whitelist | whitelist on |
whitelist off | Disable whitelist | whitelist off |
Tip: Use
whitelist onduring maintenance or when testing new plugins. It keeps random joins out while you work.
Operator & Permissions
Control who has admin powers on your server.
| Command | What It Does | Example |
|---|---|---|
op <player> | Give operator (admin) status | op Steve |
deop <player> | Remove operator status | deop Steve |
Important: Operators have full access to every command. For finer control, use a permissions plugin like LuckPerms — it lets you assign specific permissions per player or group without giving full OP access.
World & Gameplay
Commands that affect the world itself — time, weather, difficulty, and game rules.
Time
| Command | What It Does | Example |
|---|---|---|
time set day | Set to daytime (1000 ticks) | time set day |
time set night | Set to nighttime (13000 ticks) | time set night |
time set noon | Set to noon (6000 ticks) | time set noon |
time set midnight | Set to midnight (18000 ticks) | time set midnight |
time set <ticks> | Set to exact tick value | time set 0 |
time add <ticks> | Advance time by ticks | time add 1000 |
time query daytime | Show current time of day | time query daytime |
Weather
| Command | What It Does | Example |
|---|---|---|
weather clear | Clear skies | weather clear |
weather clear <seconds> | Clear for a duration | weather clear 600 |
weather rain | Start rain | weather rain |
weather thunder | Start thunderstorm | weather thunder |
Difficulty
| Command | What It Does |
|---|---|
difficulty peaceful | No hostile mobs, health regenerates fast |
difficulty easy | Hostile mobs deal less damage |
difficulty normal | Standard difficulty |
difficulty hard | Hostile mobs deal more damage, hunger can kill |
Game Rules
Game rules control core mechanics. These are the ones you will actually use:
| Command | What It Does | Default |
|---|---|---|
gamerule keepInventory true | Players keep items on death | false |
gamerule doDaylightCycle false | Freeze time | true |
gamerule doWeatherCycle false | Freeze weather | true |
gamerule doMobSpawning false | Disable mob spawning | true |
gamerule mobGriefing false | Mobs cannot destroy blocks (creepers, endermen) | true |
gamerule doFireTick false | Fire does not spread | true |
gamerule pvp false | Disable player vs player | true |
gamerule announceAdvancements false | Hide advancement messages in chat | true |
gamerule playersSleepingPercentage 50 | % of players needed to skip night | 100 |
gamerule spawnRadius 10 | Spawn area radius in blocks | 10 |
gamerule maxEntityCramming 24 | Max entities in one block | 24 |
gamerule randomTickSpeed 3 | Crop/plant growth speed | 3 |
Pro tip for SMPs:
gamerule playersSleepingPercentage 50is a must-have. No more waiting for that one AFK player to sleep. Check our SMP server guide for more essentials.
Teleportation
Move players around the world instantly.
| Command | What It Does | Example |
|---|---|---|
tp <player> <x> <y> <z> | Teleport player to coordinates | tp Steve 100 64 -200 |
tp <player> <target> | Teleport player to another player | tp Steve Alex |
tp @a <x> <y> <z> | Teleport all players to coordinates | tp @a 0 100 0 |
tp @r <x> <y> <z> | Teleport a random player | tp @r 0 64 0 |
Target Selectors
These work in any command that accepts a player argument:
| Selector | Meaning |
|---|---|
@a | All players |
@r | Random player |
@p | Nearest player |
@e | All entities (including mobs) |
@s | The command executor |
Giving Items & Effects
| Command | What It Does | Example |
|---|---|---|
give <player> <item> [amount] | Give items to a player | give Steve diamond 64 |
clear <player> | Clear all items from inventory | clear Steve |
clear <player> <item> | Clear specific item | clear Steve diamond |
effect give <player> <effect> <seconds> <level> | Apply a status effect | effect give Steve speed 60 2 |
effect clear <player> | Remove all effects | effect clear Steve |
enchant <player> <enchantment> <level> | Enchant held item | enchant Steve sharpness 5 |
xp add <player> <amount> | Give XP points | xp add Steve 1000 |
xp add <player> <amount> levels | Give XP levels | xp add Steve 30 levels |
Game Mode
| Command | What It Does |
|---|---|
gamemode survival <player> | Switch to survival |
gamemode creative <player> | Switch to creative |
gamemode adventure <player> | Switch to adventure (cannot break blocks) |
gamemode spectator <player> | Switch to spectator (fly through blocks, invisible) |
defaultgamemode survival | Set the default for new players |
Server Management
Commands for controlling the server itself.
| Command | What It Does | Notes |
|---|---|---|
stop | Shut down the server gracefully | Saves all data before stopping |
save-all | Force-save all worlds | Run before risky operations |
save-off | Disable auto-saving | Use during backups, then save-on |
save-on | Re-enable auto-saving | Always run after save-off |
reload confirm | Reload server config and plugins | May cause issues — restart is safer |
seed | Display the world seed | Useful for sharing with builders |
Warning: Avoid
reload confirmon production servers. It can cause memory leaks and plugin conflicts. A cleanstopand restart is always safer. On Swelis, just hit the restart button in your dashboard.
World Border
Control the playable area of your world. Essential for SMPs that want to keep players close together.
| Command | What It Does | Example |
|---|---|---|
worldborder set <size> | Set border diameter in blocks | worldborder set 10000 |
worldborder set <size> <seconds> | Gradually resize over time | worldborder set 5000 300 |
worldborder center <x> <z> | Set border center | worldborder center 0 0 |
worldborder get | Show current border size | worldborder get |
worldborder add <blocks> | Expand border | worldborder add 1000 |
worldborder add <blocks> <seconds> | Expand gradually | worldborder add 1000 60 |
worldborder damage amount <dps> | Set damage outside border | worldborder damage amount 0.2 |
worldborder warning distance <blocks> | Red vignette distance | worldborder warning distance 10 |
Communication
| Command | What It Does | Example |
|---|---|---|
say <message> | Broadcast message as [Server] | say Server restarting in 5 minutes |
tell <player> <message> | Private message to a player | tell Steve Check your inventory |
msg <player> <message> | Same as tell | msg Steve Hey! |
title <player> title {"text":"Hello"} | Show title text on screen | title @a title {"text":"Welcome!"} |
title <player> subtitle {"text":"Sub"} | Show subtitle below title | title @a subtitle {"text":"Have fun"} |
title <player> actionbar {"text":"Hi"} | Show text in action bar | title @a actionbar {"text":"PvP enabled"} |
Performance & Debugging
When things feel slow, these commands help you figure out why. For a deeper dive into lag, check out How to Fix Minecraft Server Lag.
| Command | What It Does | Notes |
|---|---|---|
tps | Show ticks per second (PaperMC) | 20 = perfect, below 18 = lag |
timings on / timings paste | Generate performance report (Paper) | Shows exactly what is eating TPS |
spark profiler | Advanced profiling (Spark plugin) | More detailed than timings |
kill @e[type=!player] | Kill all non-player entities | Nuclear option for entity lag |
kill @e[type=item] | Clear dropped items | Helps with item entity lag |
forceload add <x> <z> | Keep a chunk loaded permanently | Use sparingly — adds load |
forceload remove <x> <z> | Stop force-loading a chunk | forceload remove 0 0 |
Quick Lag Diagnosis
- Run
tps— if below 18, you have a problem - Run
timings on, wait 5 minutes, thentimings paste - Check the report for the biggest time consumers
- Common fixes: reduce view distance, limit entity counts, optimize your settings
Scoreboard (For Minigames & Events)
Scoreboards are powerful for events, custom games, and player stats.
| Command | What It Does | Example |
|---|---|---|
scoreboard objectives add <name> <criteria> | Create objective | scoreboard objectives add kills playerKillCount |
scoreboard objectives setdisplay sidebar <name> | Show on sidebar | scoreboard objectives setdisplay sidebar kills |
scoreboard players set <player> <objective> <value> | Set a score | scoreboard players set Steve kills 5 |
scoreboard players add <player> <objective> <value> | Add to a score | scoreboard players add Steve kills 1 |
scoreboard objectives remove <name> | Delete objective | scoreboard objectives remove kills |
Common Criteria
| Criteria | Tracks |
|---|---|
dummy | Manual scores only (for custom systems) |
playerKillCount | Player kills |
totalKillCount | All kills (mobs + players) |
deathCount | Deaths |
health | Current health |
Data Packs & Structure Commands
| Command | What It Does | Example |
|---|---|---|
datapack list | Show loaded data packs | datapack list |
datapack enable <name> | Enable a data pack | datapack enable "file/my_pack" |
datapack disable <name> | Disable a data pack | datapack disable "file/my_pack" |
locate structure <type> | Find nearest structure | locate structure village |
locate biome <type> | Find nearest biome | locate biome cherry_grove |
Essential Command Combos
Here are some real-world scenarios and the commands to handle them:
Setting Up a New SMP
gamerule playersSleepingPercentage 50
gamerule keepInventory false
difficulty normal
worldborder set 20000
worldborder center 0 0
whitelist on
Emergency Lag Fix
save-all
kill @e[type=item]
kill @e[type=!player,type=!villager]
gamerule randomTickSpeed 1
Locking Down for Maintenance
say Server maintenance starting in 5 minutes!
whitelist on
kick @a Server maintenance — back soon!
save-all
Setting Up a Build Event
gamemode creative @a
gamerule doDaylightCycle false
time set noon
weather clear 999999
gamerule doMobSpawning false
worldborder set 500
worldborder center 100 200
Quick Reference Card
The 10 commands every admin types daily:
| # | Command | Purpose |
|---|---|---|
| 1 | list | Who is online? |
| 2 | tps | Is the server lagging? |
| 3 | kick <player> <reason> | Remove a troublemaker |
| 4 | ban <player> <reason> | Permanently remove a troublemaker |
| 5 | tp <player> <x> <y> <z> | Teleport someone |
| 6 | gamemode creative <player> | Toggle creative for a builder |
| 7 | time set day | Skip the night |
| 8 | weather clear | Stop the rain |
| 9 | say <message> | Announce something |
| 10 | save-all | Save everything right now |
Related Guides
- How to Set Up Your First Minecraft Server — get your server running in under 2 minutes
- How to Fix Minecraft Server Lag — diagnose and fix performance problems
- Best Minecraft Server Plugins 2026 — top 20 plugins to level up your server
- How to Make a Minecraft SMP Server — the complete SMP setup guide
