Commands in Minecraft can be used to execute additional or special functions. Minecraft itself already includes over 100 commands without any modifications, allowing you to activate, manage, or perform a wide range of functions.
This article in our documentation covers the most important commands that are frequently used and needed. If a command is not listed here, the official Minecraft Wiki can help, as it explains every area (including all commands) in detail.
Every command always starts with a "/". So if you want to use a command, you need to open the chat in-game and first type "/", then you can enter the command. Pressing the TAB key shows a preview of all available commands. This allows commands to be quickly and easily auto-completed—similar to search queries on the internet.
When running commands via the console, the "/" is not necessary and should be omitted! This symbol only serves to distinguish between a normal chat message and a command in-game.
To use commands, the necessary permissions are required. In Minecraft Vanilla or Forge, there is no real permission system like the plugins used in Spigot. Only the OP permission level system is used here. You can find a guide to the OP permission system here: OP Permissions
If a permission system is installed and permissions for specific Minecraft commands need to be assigned, the respective permissions can be assigned as described below.
The syntax of permissions for each command is always the same and can be adjusted accordingly.
For example, if you want to assign permissions for the locate command, the following permission must be set: minecraft.command.locate
The /tp command allows admins to teleport to other players or teleport a player to a desired target player. The command can also be used to teleport mobs or teleport yourself to a specific position by specifying coordinates. Details are provided below.
Examples:
/tp PlayerA
Teleports the command executor to another player.
/tp PlayerA PlayerB
Teleports PlayerA to PlayerB. Regardless of who executes the command, the specified players are teleported. If the executor is PlayerB, PlayerA will be teleported to them.
/tp -100 75 985
The command executor is teleported to the specified coordinates.
If a player is specified before the coordinates (/tp PlayerA -100 75 985), that player is teleported there instead.
/tp @s @e[type=minecraft:cow,distance=..10,limit=1]
Teleports you to the nearest cow within 10 blocks.
@s can also be replaced by a player like PlayerA, who will then be teleported.
The /locate command lets you find the coordinates of a searched structure, e.g., a villager village.
Examples:
/locate fortress
Finds and displays the location of the nearest Nether fortress when you are in the Nether.
/locate village
Finds and displays the location of a villager village, similar to Nether fortresses.
This command lets you set a world border within the current world. This prevents players from exploring beyond the specified boundary.
Examples:
/worldborder center 0 0
Sets the center of the world to coordinates 0;0, from where the radius is calculated and set.
/worldborder set 16000
Sets the border to 16,000x16,000 blocks. This corresponds to a radius of 8,000 blocks in each direction.
This command allows you to give players (or entities) normal potion effects. Some effects are only available via commands, such as the Luck effect, which otherwise has no function.
The command has changed, expanded, and adapted over versions. The examples below are from the latest version and may look different in older versions!
Examples:
/effect give PlayerA minecraft:speed
Gives the player PlayerA the speed effect level 1.
This command lets you change special settings in a world or enable/disable functions. For example, as in the example below, it can be enabled that players keep their inventory upon death.
Examples:
/gamerule keepInventory true
This setting ensures that players keep their inventory (including experience) upon death.
/gamerule mobGriefing false
This command defines whether monsters like Creepers can damage the world or not.
The server automatically saves the world to disk every 5 minutes. This command saves the world immediately and resets the countdown for automatic saving to 5 minutes.
This command lets you query the TPS (ticks per second) on Spigot and Paper Spigot. TPS indicates the server's performance. The maximum and best TPS a server can reach is 20. The TPS show the last 60 seconds, and the next two values are the average of the last 5 and 15 minutes.
This command lets you ban a player from the server so they can no longer access it under any circumstances. The player account is banned based on the UUID.
On servers with offline mode disabled, players can change their name and regain access. In such cases, an IP ban via plugins is the best solution.
Examples:
/ban PlayerA
The player PlayerA is banned from the server.
/ban @a
This command bans all current players on the server. Admins with OP rights are not affected and remain on the server.
This command lets you lift a ban so the player can access the server again.
Examples:
/pardon PlayerA
The player PlayerA is removed from the ban list and can rejoin the server.
This command disconnects the specified player from the server. The player is forced to leave but can reconnect.
Examples:
/kick PlayerA
Kicks the player PlayerA from the server with the message “Kicked by an operator.”
/kick PlayerA Reason
Kicks the player PlayerA from the server with the message “Reason.”
