How to run Minecraft Commands in-game

If you are a Server Operator or have been granted OP permissions (See: How to OP a Player on your Minecraft Server), you can run a variety of commands from within the game. This short guide will explain how to run a command and showcase the most commonly used ones.


Running a Command

To run a command in Minecraft you must first be familiar with the chat function of the game.

  • Chat can be opened at any time by pressing the T key by default.
  • If you are running a command you can also open the chat with the / key.
  • If there is no / at the beginning of what you type, it will be sent to the game as a chat message.

Once you have the chat open, make sure there is a / at the start of the message and begin typing your command.

  • Do not include a space between the / and the start of the command otherwise Minecraft will show an Unknown Command error message.
  • If you see the Unknown Command message at any other time, double-check your spelling and capitalisation.
  • If you want to run the same command multiple times, simply open the chat with T or / and press the up arrow on your keyboard to cycle through your previous entries.

Common Commands and Uses

There are many commands that a server owner or administrator will find useful.

You can see a full list of Minecraft commands on the official Minecraft wiki: Server Commands for Minecraft.

If you are playing on a modded server, there may be commands added by mods in the pack. These can usually be found on the mods information page on Curseforge or by typing the /help command in chat to see a full list.

When typing a command you must replace any data within <> or [] with the relevant value.

Command List

Command Effect
/ban <playername> Bans the targeted player from the server.
/ban-ip <IP> Bans the targeted IP from the server.
/banlist <IPs> Shows a list of the banned IPs on the server
/clear <playername> Clears the targeted players inventory of all items
/deop <playername> Removes OP status from the targeted player.
/difficulty [0|1|2|3] Sets the server difficulty.
/xp [amount] <playername> Gives experience to the targeted player.
/gamemode [0|1|2|3] Sets the gamemode of the player running the command.
/give <playername> <item> <amount> Gives the targeted player items. e.g. /give Notch diamond_block 12 would give Notch 12 Diamond Blocks.
/help Lists all available commands.
/kick <playername> Kicks the targeted player from the server
/list Lists all online players.
/op <playername> Grants the targeted player OP status.
/pardon <playername> Removes the targeted player from the banlist.
/pardon-ip <IP> Removes the targeted IP from the banlist.
/save-all Saves the server world and files.
/save-off Disables server auto-saving.
/save-on enables server auto-saving.
/spreadplayers <x> <z> <spreadDistance> <maxRange> Spreads all online players around the map.
/stop Saves the server and then stops it.
/tell <playername> <message> Sends a private message to the targeted player in chat.
/time set <ticks> Sets the time in the current world with 0 being midnight.
/toggledownfall Toggles rain and snow on or off.
/tp <playername> <x> <y> <z> Teleports the targeted player to the coordinates specified.
/tp <yourname> <playername> Teleports you to the targeted player.
/tp <playername> <yourname> Teleports the targeted player to you.
/whitelist on Enables the Whitelist
/whitelist off Disables the Whitelist
/whitelist list Shows a list of all Whitelisted players

StickyPiston Support

Whether you own a Server with StickyPiston.co or don’t, we are always happy to help with any technical issues you may be having. Open a support ticket with our team and we will be in touch.

Open Support Ticket


Further Reading & External Links

  • 0 Users Found This Useful

Was this answer helpful?

 Print this Article

Also Read

How to restore a Minecraft World From a Backup

If your world ever badly gets griefed or gets corrupted we keep 3 backups of your world which are...

How to use a whitelist on your Minecraft server

A whitelist can be used to limit which players can join your server.This is ideal if you want to...

How to Upload a Minecraft Map to your Minecraft Server

When you find a Minecraft map, adventure or minigame that works well for multiple players, it is...

How to add a Co-owner to Multicraft

You can give your friends access to your multicraft control panel if they are the co-owner or...

How to use a Custom Seed in a Minecraft world

A guide to starting a brand new world with Multicraft using a new seed value or alternate terrain...