Minecraft Server Commands You Should Know

Minecraft Server Commands

Although Minecraft is a survival sandbox game that gives players a lot of freedom, players can unlock even more freedom by using Minecraft commands. These commands allow players to control gameplay, automate actions, and manage servers more effectively. Wondering what they are? Let’s break them down.

How to Run a Command

  1. Create New World and press More World Options…
  2. Set Allow Cheats to ON
    • If you forget, enable it during the game via Settings > Open to LAN > Allow Cheats ON > Start LAN World.
  3. Enter your game and press / in the chat box. If the command prompt appears, you’re ready to start typing Minecraft commands.

To enable command blocks on a server, make sure enable-command-block=true is set in your server.properties file.

Things to Know Before Using Commands

  • Minecraft commands aren’t simple cheats; they often auto-suggest further arguments as you type.
  • Expect a short learning curve.

Using Arguments

Commands often require “arguments” to be effective. For example:

  • /gamemode creative xxx → sets the player “xxx” to Creative mode.
  • Typing /gamemode or /time alone will prompt further syntax suggestions.

Using Targets

You can direct commands to specific targets using these selectors:

  • @p = nearest player
  • @r = random player
  • @a = all players
  • @e = all entities
  • @s = self (command issuer)

Example:

  • /kill @a → instantly kills all players on the server.

Quick Selector Reference

SelectorDescription
@pNearest player
@rRandom player
@aAll players
@eAll entities
@sSelf (command issuer)

Commonly Used Minecraft Commands

CommandDescription
/helpLists all commands or gives usage tips.
/gamemode creative [playername]Changes a player’s mode to Creative.
/tp @a <player name>Teleports all players to the specified player.
/weather <type> [duration]Changes weather to Clear, Rain, or Thunder.
/time set day/nightSets time to day or night.
/time add <value>Skips forward in time.
/give <player> <item> <amount>Gives items to players.
/locate <structure>Locates the nearest structure.
/enchant <player> <enchantID> <level>Enchants the item a player is holding.
/xp add <player> <amount> <points/levels>Adds XP or levels to a player.
/experienceAlias for /xp to manage experience.
/gamerule <rule> <value>Modifies game behavior like daylight cycle or mob spawning.

Most Useful For:

  • Creative building: /give, /gamemode, /setblock
  • Exploration: /tp, /locate, /time set, /weather
  • XP/Enchantments: /xp, /enchant, /effect

Advanced Commands for Server Admins

These commands offer powerful administrative control:

CommandDescription
/ban <player> <reason>Bans a player.
/ban-ip <IP>Bans by IP address.
/banlistShows all banned users.
/clear <target> <item> <amount>Removes items from inventory.
/clone <x1> <y1> <z1> …Clones and places block structures.
/dataInteract with NBT data.
/datapackManages datapacks.
/debug <start/stop/report>Controls debug sessions.
/defaultgamemode <mode>Sets default game mode.
/deop <player>Revokes operator status.
/difficulty <level>Changes difficulty.
/effect give/clearApplies or clears effects.
/executeExecutes chained commands.
/kick <player> <reason>Kicks a player.
/kill <target>Kills entities or players.
/list [uuids]Shows online players.
/lootSpawns items or loot tables.
/msg or /tellSends private messages.
/op <player>Grants operator status.
/pardon <player>Unbans a player.
/pardon-ip <IP>Unbans an IP.
/playsoundPlays a sound effect.
/recipeGrants or removes recipe access.
/reloadReloads advancements/functions.
/replaceitemReplaces items in inventory or blocks.
/save-allSaves the world.
/save-offDisables auto-save.
/save-onEnables auto-save.
/say <message>Broadcasts a message.
/seedShows the world seed.
/setblockChanges one block to another.
/setidletimeoutSets AFK timeout.
/setworldspawnSets the global spawn point.
/spawnpointSets a player’s spawn point.
/spectate <player>Enters spectate mode.
/spreadplayersRandomly spreads players.
/stopStops the server.
/stopsoundStops sound effects.
/summon <entity>Summons a mob or entity.
/tagManages tags for entities.
/teamManages teams.
/teammsgSends team-only messages.
/tellrawSends raw JSON messages.
/titleManages screen titles.
/triggerActivates trigger objectives.
/whitelist add/removeManages whitelist.
/whitelist on/off/list/reloadWhitelist control.
/worldborderSets world boundaries.

Admin Pro Tips:

  • Avoid OP-ing strangers: Only trusted players should have access to powerful commands.
  • Backup regularly: Use /save-all frequently or set up auto backups.
  • Use /execute carefully: It allows complex logic and is very powerful but can break worlds if misused.

A Note on Command Blocks

Command blocks allow automation and advanced logic without using mods. To use them:

  1. Enable them in your server.properties (enable-command-block=true).
  2. Use /give @p command_block to get one.
  3. Right-click to insert commands just like chat, but for automatic execution.

Use these for things like teleport systems, custom maps, and redstone machines.

Scroll to Top