Console & Commands

Command Reference

Complete reference of Minecraft server commands available through the console.

This reference covers the most commonly used Minecraft server commands. All commands are entered in the console without the / prefix.

Player Management

CommandDescription
op <player>Grant operator (admin) status to a player
deop <player>Remove operator status from a player
kick <player> [reason]Kick a player from the server
ban <player> [reason]Ban a player from the server
ban-ip <ip> [reason]Ban an IP address
pardon <player>Remove a player from the ban list
pardon-ip <ip>Remove an IP from the ban list
whitelist add <player>Add a player to the whitelist
whitelist remove <player>Remove a player from the whitelist
whitelist listShow all whitelisted players

World & Gameplay

CommandDescription
save-allForce save the world to disk
save-offDisable automatic saving (for backups)
save-onRe-enable automatic saving
time set <value>Set time (day, night, noon, midnight, or ticks)
weather <type>Set weather (clear, rain, thunder)
difficulty <level>Set difficulty (peaceful, easy, normal, hard)
gamemode <mode> [player]Set gamemode (survival, creative, adventure, spectator)
gamerule <rule> [value]View or set game rules

Server Management

CommandDescription
listShow online players
say <message>Broadcast a message to all players
tell <player> <message>Send a private message to a player
stopStop the server gracefully
reloadReload datapacks and some configurations
seedDisplay the world seed

Teleportation

CommandDescription
tp <player> <x> <y> <z>Teleport player to coordinates
tp <player> <target>Teleport player to another player
setworldspawn <x> <y> <z>Set the world spawn point

Common Game Rules

Use gamerule <rule> true/false to toggle these settings:

RuleDescriptionDefault
keepInventoryKeep inventory on deathfalse
mobGriefingMobs can destroy blockstrue
doDaylightCycleTime passes naturallytrue
doWeatherCycleWeather changes naturallytrue
announceAdvancementsAnnounce achievements in chattrue
playersSleepingPercentage% of players needed to skip night100