Minecraft server commands are how you run and moderate a server: granting operator status, switching game modes, setting game rules like keep inventory, managing the whitelist, banning and pardoning players, controlling time and weather, and shutting the server down safely. This is a practical cheat sheet of the commands that matter most for server owners, how they differ when you run them from the console versus in-game, and where to run them on a Loafhosts server. Every command here works on vanilla, Paper, Purpur, and Spigot Java servers.
Running Commands: Console vs In-Game
There are two places you run server commands. The server console runs as the server itself with full authority, and you type commands there without a leading slash. In-game, you type commands in chat with a leading slash, and you must be an operator for anything administrative. On Loafhosts the console is the Console tab in the LPV5 panel, which is the most reliable place to run commands because it always has full permission, even when no one is opped or online.
Note: Console: no leading slash, always full authority (the LPV5 Console tab)
Note: In-game: leading slash, and you must be an operator for admin commands
Operators and Permission Levels
Operators are the admins of your server. Use op to grant operator status and deop to remove it. To view the operator list, open ops.json in the File Manager or use a permissions plugin. Minecraft has four operator permission levels set in server.properties; level four is full access. The cleanest first step on a new server is to op your own account from the console so you can manage the rest in-game.
| Command | Description |
|---|---|
op YourName | Grants operator status to a player. Run from the console to op your first admin. |
deop YourName | Removes operator status from a player. |
Tip: Op your own account from the console first, then manage everyone else in-game
Tip: Keep the operator list small — op is full control of the server
Tip: To see the current operator list, open ops.json in the File Manager or use a permissions plugin
Player and Game Mode Commands
These commands manage players and how they play. gamemode changes one player’s mode; defaultgamemode sets the mode for new players; difficulty sets the server difficulty. tp teleports players, give hands out items, and kill, clear, xp, and effect round out the common toolkit. Most accept target selectors such as the all-players and nearest-player selectors so you can affect many players at once.
| Command | Description |
|---|---|
gamemode creative YourName | Sets a player’s game mode (survival, creative, adventure, spectator). |
defaultgamemode survival | Sets the game mode new players start in. |
difficulty hard | Sets server difficulty (peaceful, easy, normal, hard). |
tp PlayerA PlayerB | Teleports PlayerA to PlayerB. Also accepts coordinates. |
give YourName minecraft:diamond 64 | Gives items to a player by id and amount. |
World and Environment Commands
Control the world itself with these. time set changes the time of day, weather sets clear, rain, or thunder, setworldspawn fixes where players appear, and worldborder limits the playable area. seed prints the world seed, which is handy when you want to share or recreate a map.
| Command | Description |
|---|---|
time set day | Sets the time of day (day, night, noon, midnight, or a number of ticks). |
weather clear | Sets the weather (clear, rain, thunder), optionally for a duration. |
setworldspawn | Sets the world spawn to your current position (or given coordinates). |
seed | Prints the world seed. |
Game Rules: keepInventory and More
Game rules toggle core behaviors and are some of the most-searched server settings. Set them with the gamerule command. The big ones: keepInventory keeps items on death, doDaylightCycle freezes or runs the day cycle, mobGriefing controls whether mobs change blocks, doFireTick controls fire spread, and randomTickSpeed changes how fast crops grow and blocks update. Run gamerule with no value to read its current setting.
| Command | Description |
|---|---|
gamerule keepInventory true | Players keep their items and XP when they die. |
gamerule doDaylightCycle false | Freezes the time of day (combine with time set). |
gamerule mobGriefing false | Stops mobs (creepers, endermen) from changing blocks. |
gamerule randomTickSpeed 3 | Default growth/tick rate; raise it to speed up crops (higher values cost performance). |
Tip: Run a gamerule with no value to see its current setting before changing it
Moderation: Whitelist, Kick, and Ban
Keep your server under control with these. The whitelist limits who can join; turn it on and add players by name. kick removes a player for the session, while ban and ban-ip block them for good. To reverse a ban, use pardon (or pardon-ip) — covered in depth in the How to Unban Someone in Minecraft guide.
| Command | Description |
|---|---|
whitelist on | Enables the whitelist so only listed players can join. |
whitelist add PlayerName | Adds a player to the whitelist. |
kick PlayerName Reason | Disconnects a player for this session with an optional reason. |
ban PlayerName Reason | Bans a player by name. Reverse with pardon. |
Tip: Turn the whitelist on before your first public share to keep early griefers out
Server Management and Saving
These keep the server healthy. list shows who is online, save-all writes the world to disk, and stop shuts the server down cleanly so nothing is lost. Avoid relying on reload to apply plugin or config changes — it is known to cause issues; on Loafhosts use the panel’s Restart button instead, which stops and starts the server cleanly. Schedule save-all and restarts from the LPV5 Schedules tab so you never have to do it by hand.
| Command | Description |
|---|---|
list | Lists the players currently online. |
save-all | Forces the world to save to disk. |
stop | Shuts the server down cleanly. On Loafhosts, prefer the panel Stop/Restart buttons. |
Warning: Avoid reload for config or plugin changes — it can corrupt state; restart the server instead
Running Commands on Loafhosts
On Loafhosts you run commands from the Console tab in the LPV5 panel — type them without a slash and watch the output live. For commands you want to run on a timer, like a nightly save-all or a daily restart with a warning message, use the Schedules tab so they run automatically. Because the console runs as the server, you never need to op an account just to administer the box from the panel.
- Open your server in the LPV5 panel at hub.loafhosts.com
- Open the Console tab and type a command without a leading slash
- Watch the live output to confirm it worked
- For recurring commands, open the Schedules tab and add them with a time or interval
Frequently Asked Questions
How do I op myself on a Minecraft server?
Run op followed by your username from the server console. On Loafhosts, open the Console tab in the LPV5 panel and type op YourName without a slash. The console has full authority, so you do not need to be opped already to grant it.
How do I run commands from the server console?
Type the command without a leading slash. The console runs as the server with full permission, so commands like op, gamerule, and stop work without being an operator. On Loafhosts this is the Console tab in the panel.
What is the command to keep items on death?
Run gamerule keepInventory true. Players then keep their inventory and experience when they die. Set it back to false to return to default survival behavior.
How do I stop my Minecraft server safely?
Run stop from the console to shut down cleanly and save the world. On Loafhosts, prefer the panel’s Stop or Restart buttons, which do the same thing reliably from the dashboard.
Should I use reload to apply changes?
No — reload is known to cause problems with plugins and config state. Restart the server instead. On Loafhosts use the Restart button, or schedule a restart so changes apply on a clean start.