Minecraft Vanilla Server Commands
Last modified on May 5, 2022 in General
By Dalton Whalen
As a server owner, it is only a matter of time before you will need to make use of commands. There are hundreds of commands available in the base game. They can do anything from changing the time of day to completely killing every mob on the server and creating scoreboards for your players. The commands may feel like cheating at times, but more often than not they are essential for maintaining your server and keeping your players happy.
You can run a command both in the game and through your server’s console. To use a command in the game, type a “/” then the command and just hit enter. Otherwise you can just type the command into your server’s console without the “/” to run it. Here is a full list of commands available in Vanilla Minecraft.
|/help ||shows a full list of commands available on the server, or gives you information about a specific command.||/help weather|
|/give ||gives a player any item in the game, leave the [amount] field blank to give a full stack of the item.||/give iVestri iron_pickaxe 1|
|/weather ||changes the weather in the world. There are four types of weather available in the game: rain, thunder, snow, and clear||/weather clear|
|/gamemode ||This changes your gamemode, or you can add a player’s name to change their gamemode instead. There are four gamemodes available in the game: Survival, creative, spectator, and adventure||/gamemode creative|
|/summon ||immediately summons an object to your location.||/summon villager|
|/tp [username] ||Teleports you or another player to the coordinates. You can also use it to teleport players to each other.||/tp iVestri smattox|
|/time set ||Allows you to set the time of day on the server. You can use values like Day or Night, or you can set a specific time in ticks.||/time set day|
|/xp ||Gives xp to yourself, or to a certain player.||/xp 1000 iVestri|
|/locatebiome ||This command will tell you where the nearest biome of your choice is.||/locatebiome plains|
|/msg ||Sends a private message to another player.||/msg iVestri hello!|
|/ops||displays a full list of opped players||/ops|
|/perf||This command runs a short debug function for 10 seconds. It will create files for you in your server’s debug folder that will give a detailed overview of what is happening on your server. This is particularly useful for diagnosing lag.||/perf|
|/save-all||Causes the server to create an automated backup. You are limited to two automated backups at a time, so previous ones will be overwritten. You can view your backup from the backups tab of your server control panel.||/save-all|
|/stop||this will cause your server to start shutting down.||/stop|
|/restart||this will shut down your server and cause it to restart after a few minutes||/restart|
|/worldborder||A series of commands that allows you to create and set a border in your world.||/worldboard add 100|
|/whitelist||allows you to enable/disable the whitelist and control the players on it.||/whitelist add Daltondorf|
|/gamerule ||This is a very powerful command that will allow you to change the base rules of your world. Please be careful when using this command.||/gamerule doDaylightCycle false|
|/ban ||adds the username to your server’s ban list. This will prevent that user from joining again.||/ban notch|
|/ban-ip ||adds the IP address of the player to your server ban list. This is useful if you suspect a person you are banning has multiple Minecraft accounts.||/ban-ip notch|
|/pardon ||This command will remove someone from the ban list||/pardon iVestri|
|/banlist||shows a full list of players you have banned||/banlist|
|/clear [username]||This command will remove all of the items from your inventory. If you add a player’s username it will remove their inventory instead.||/clear iVestri|
|/datapack ||this command will allow you to control the datapacksyou have on your server. It has three arguments you can use: enable, disable, and list.||/datapack enable seasons|
|/op ||Grants a user operator permissions. After using this command the user will have access to all other commands on the server. You cannot op yourself in the game with this command, you must use it in the console.||/op iVestri|
|/deop ||The opposite of the /op command. This command removes operator permissions from a user.||/deop iVestri|
|/difficulty [difficulty]||This command allows you to change the difficulty of your server. There are four difficulty levels you can use: Peaceful, easy, normal, hard. Please note that changing the difficulty to hard will not enable hardcore mode. That must be done through your server settings.||/difficulty peaceful|
|/seed||Allows you to view your world’s current seed. If you click on the seed after it is displayed it will be automatically copied to your clipboard.||/seed|
You do not have permission to use this command:
This error will appear if you are trying to run a command when you are not Opped on the server, or if you have not been given permission to use it by the server owner. You can follow our related guide on how to op yourself to get around this issue, or contact the server owner to give you access.
A syntax error such as “invalid argument”.
If you receive an “invalid argument” or similar error, it is usually because there is a typo, or because you are not using the command correctly. You can reference back to this guide to double check that you have the correct command and arguments added. In later updates of the game or on servers with EssentialsX or similar plugins, the game will automatically start filling in the command for you. Just press the tab key to cycle through your options.