Articles on: Minecraft

What commands can I use on my Minecraft server?

You can view a list of available commands on your Minecraft server at any time with /help but we've provided an up-to-date explanation of some of the most commonly used commands on Minecraft servers. These should work regardless of whether you're on Pufferfish/Paper, Fabric, or the vanilla server software, but the majority of them require you to have op(erator) privileges on the server if running in-game.

If running these via the console, remember to remove the / from the beginning of the command!

Command arguments surrounded by < > are required, whereas those surrounded by [ ] are optional. In any case where the [player] specification is optional, the command will likely perform the action on the player running the command.


/whitelist <on/off/add/remove> [player]

Either turns on/off the whitelist, or adds/removes a player from it if specified, e.g. /whitelist add Fyo


/gamerule <gamerule> <value>

Sets a gamerule to the value specified. Usually value is true / false or a number. Here are some popular gamerules:

/gamerule commandBlockOutput false – stops command blocks from outputting into chat
/gamerule doFireTick false – prevents fire from spreading between blocks
/gamerule doInsomnia false – stops pesky phantoms from spawning at night!
/gamerule doMobSpawning false – stops mobs from spawning, although you'll need to run /kill @e to kill any existing mobs in the world
/gamerule keepInventory true – makes players keep their inventory on death
/gamerule mobGriefing false – prevents mobs from destroying blocks (e.g. creeper explosions or endermen)
/gamerule playersSleepingPercentage 50 – makes it so that only the specified percentage of players need to sleep (in this case, half of all online players)



Sets the current world's spawn to the location you're standing in. You may want to run /gamemode spawnRadius 0 to make players spawn on the exact block you set.


/difficulty <peaceful/easy/normal/hard>

Sets the server's difficulty level, e.g. /difficulty normal with the available ones being:

Peaceful – hostile mobs don't spawn, hunger is always full meaning health regenerates quickly
Easy – mobs don't deal much damage, zombies can't break doors, cave spiders don't poison players
Normal – mobs deal more damage, hunger can decrease a lot, vindicators can break doors
Hard – mobs deal the most damage, hunger can kill players, zombies can break wooden doors


/give <player> <item> [amount]

Gives the player an item. If no amount is specified, it defaults to a stack (64) of that item.


/clear [player]

Clears your own inventory, or the inventory of another player if specified.


/kill [player]

Kills you, or another player if specified.


/gamemode <gamemode> [player]

Sets the player's gamemode to the one specified. Available gamemodes on the latest version are survival / creative / spectator / adventure (adventure mode is great to give to players if you want them viewing your world without being able to break blocks!)


/tp <destination player/coords> to teleport yourself to a another player or set of coords
/tp <target player> <destination player> to teleport a player to another player
/tp <target player> <destination coords> to teleport a player to a set of coords

I could use /tp Fyo for example to teleport to a player named "Fyo", or /tp 103 68 510 to teleport to those specified coordinates.


/time set <day/night/noon/midnight>

Sets the time of the Minecraft world to what is specified, for example if I run /time set day during the night it'll skip to daytime. If you want to permanently stop the world time from changing, you can run /gamerule doDaylightCycle false


/weather <clear/rain/thunder> [duration]

Sets the weather of the Minecraft world to what is specified, for example if I run /weather clear whilst it's raining, it'll stop the current rain. Fed up with rain? To permanently stop the weather from changing, run /gamerule doWeatherCycle false



Gives the seed of the current world you're in, which you can then click on in chat to copy.



Useful to run from the console in order to see which players are currently on your server.


/op <player>

Grants another player op(erator) permissions, allowing them to run any command on the server (like the ones on this page). Only give it to players you trust... or if they suddenly betray you, deop them with /deop <player>


/ban <player>

Permanently bans a player from your server, meaning they cannot rejoin. You can unban players with the /pardon <player> command, or if you just want to kick the player from the server while allowing them to rejoin, run /kick <player>

Updated on: 29/07/2023

Was this article helpful?

Share your feedback


Thank you!