Every built-in Basalt command, with its syntax and who can run it.
Basalt has 42 built-in commands. Players run them in chat with a leading slash; the terminal runs the same commands, with or without the slash. Plugins can add more: see Custom commands.
In the syntax below, <name> is a required argument, [name] is optional, and a|b means one of the listed words.
Who can run what
Section titled “Who can run what”Every command has a permission level.
| Level | Who has it | Commands |
|---|---|---|
| Everyone | Any player | help, list, tell, me |
| Operator | Operators and the terminal | Everything else, except the two below |
| Terminal only | The terminal | stop, allowlist |
A player who runs a command above their level is told they do not have permission, and the command list their client shows only includes what they can run. To make someone an operator, see Permissions, allowlist and bans.
The terminal has every permission. A few commands act on the player who runs them and so need a player: from the terminal, name the target explicitly where the command lets you.
Targets and coordinates
Section titled “Targets and coordinates”Where a command takes a player, you can give a gamertag or a selector. Names with spaces go in quotes: "Babyface Sam".
| Selector | Picks |
|---|---|
@s |
Yourself |
@p |
The nearest player |
@a |
Every player |
@r |
A random player |
@e |
Every entity. For most commands this means every player; /kill also reaches mobs, items, experience orbs and arrows. |
@n |
The nearest entity, with the same rule as @e |
Selectors take the usual arguments in square brackets: name, tag, type, m (game mode), c (count), r and rm (maximum and minimum distance), x, y, z, and dx, dy, dz.
/give @a[tag=vip] diamond 3/kill @e[type=zombie,r=20]Coordinates may be absolute, or relative to you with ~: ~ ~5 ~ is five blocks above where you stand.
General
Section titled “General”| Command | What it does |
|---|---|
/help (alias /?) |
Lists the commands you can run, with a description of each. |
/list |
Shows who is online. |
/tell <target> <message> (aliases /msg, /w) |
Sends a private message. |
/me <message> |
Sends a message about yourself, as * Steve waves. |
/say <message> |
Broadcasts a message to everyone. Operators only. |
Players
Section titled “Players”| Command | What it does |
|---|---|
/gamemode <gameMode> [player] (alias /gm) |
Changes your own game mode. gameMode is survival, creative, adventure, spectator or default, the short forms s, c, a, d, or the numbers 0, 1, 2, 5, 6. The optional player can only be yourself or @s. |
/give <player> <itemName> [amount] [data] [components] |
Gives items. amount is 1 to 32767 and defaults to 1. components is vanilla’s JSON for item components. Custom items from addons work too. The old names grass, tallgrass and totem, which the client still suggests, give grass blocks, short grass and totems of undying. |
/clear [player] [itemName] [data] [maxCount] |
Removes items from an inventory: everything, or only the item named, up to maxCount. |
/tp <destination> (alias /teleport) |
Teleports you to a player or to coordinates. |
/tp <victim> <destination> |
Teleports other players to a player or to coordinates. |
/kill [target] |
Kills the target, or yourself with no target. With @e, @n or @r[type=...] it also kills mobs and removes items, orbs and arrows. |
/effect <player> <effect> [seconds] [amplifier] [hideParticles] |
Gives a status effect. hideParticles is true or false. |
/effect <player> <effect> infinite [amplifier] [hideParticles] |
Gives a status effect that does not run out. |
/effect <player> clear [effect] |
Removes one effect, or all of them. |
/enchant <player> <enchantmentName> [level] |
Enchants the item the player is holding. An enchantment id number works in place of the name. Vanilla’s rules apply unless enchant_bypass_limits is on. |
/xp <amount> [player] (alias /experience) |
Gives experience points. Write the amount with an L to give levels instead: /xp 5L Steve. |
/spawnpoint [player] [spawnPos] |
Sets a player’s respawn point, by default yours and where you stand. |
/tag <entity> add|remove <name> |
Adds or removes a tag on a player. |
/tag <entity> list |
Lists a player’s tags. |
/fog <victim> push <fogId> [userProvidedId] |
Adds a fog setting from the resource packs to the top of a player’s fog stack, tagged with the id you give. A player holds up to 16. |
/fog <victim> pop|remove [userProvidedId] |
pop takes off the newest fog setting with that id, remove every one with it. With no id, pop takes the newest of all and remove clears the stack. |
Tags set with /tag are the same tags plugins read with hasTag, and the tag= selector argument matches them.
A player’s fog stack is saved with them, so it is still there after they rejoin. Basalt does not check that a fog id exists in the resource packs.
| Command | What it does |
|---|---|
/time set <amount> |
Sets the time of day in ticks. |
/time set day|night|midnight|noon|sunrise|sunset |
Sets the time of day by name. |
/time add <amount> |
Moves time forward by a number of ticks. |
/time query daytime|gametime|day |
Shows the time of day, the world’s age in ticks, or the day number. |
/weather clear|rain|thunder [duration] |
Changes the weather, optionally for a set duration in seconds. |
/weather query |
Shows the current weather. |
/difficulty <difficulty> |
Sets the difficulty: peaceful, easy, normal, hard, the short forms p, e, n, h, or a number. |
/gamerule |
Lists every game rule and its value. |
/gamerule <rule> [value] |
Sets a game rule, or shows its value when none is given. Rules are true/false or whole numbers. |
/setworldspawn [spawnPoint] |
Sets the world spawn, by default where you stand. |
/seed |
Shows the world’s seed. |
/summon <entityType> [spawnPos] |
Spawns a mob: cow, pig, sheep, chicken, zombie, skeleton, spider, creeper, lightning_bolt, or a summonable custom entity from an addon. |
Changes made with /difficulty, /gamerule and /setworldspawn are saved to the world’s files and sent to everyone online.
Scoreboard
Section titled “Scoreboard”| Command | What it does |
|---|---|
/scoreboard objectives add <objective> dummy [displayName] |
Creates an objective. dummy is the only criteria. |
/scoreboard objectives remove <objective> |
Deletes an objective. |
/scoreboard objectives list |
Lists the objectives. |
/scoreboard objectives setdisplay list|sidebar [objective] [ascending|descending] |
Shows an objective in the player list or the sidebar. Leave the objective out to clear the slot. |
/scoreboard objectives setdisplay belowname [objective] |
Shows an objective under players’ names. |
/scoreboard players list [entity] |
Lists tracked players, or one player’s scores. |
/scoreboard players set|add|remove <entity> <objective> <count> |
Sets, raises or lowers a score. |
/scoreboard players reset <entity> [objective] |
Clears a player’s score in one objective, or in all. |
/scoreboard players operation <entity> <objective> <operation> <entity> <objective> |
Combines two scores. Operations are +=, -=, *=, /=, %=, =, <, > and ><. |
This is the same scoreboard plugins use through world.scoreboard, and it is saved with the world. Teams, players random and players test are not supported. See Scoreboards.
Moderation
Section titled “Moderation”| Command | What it does |
|---|---|
/op <player> |
Makes a player an operator. |
/deop <player> |
Takes operator status away. |
/kick <name> [reason] |
Disconnects a player. |
/ban <player> [reason] |
Bans a player by name, and by XUID if they have joined before. They are kicked if online. |
/ban-ip <target> [reason] |
Bans an IP address. target is an address or the name of an online player. Everyone on that address is kicked. |
/pardon <player> (alias /unban) |
Lifts a player’s ban. |
/pardon-ip <address> (alias /unban-ip) |
Lifts an IP ban. |
allowlist on|off (alias whitelist) |
Turns the allowlist on or off, and updates allow_list in basalt.toml. Terminal only. |
allowlist add|remove <name> |
Adds or removes a player. Terminal only. |
allowlist list |
Lists the allowlisted players. Terminal only. |
allowlist reload |
Reads allowlist.json again after you edit it by hand. Terminal only. |
How these lists are stored is covered in Permissions, allowlist and bans.
Server
Section titled “Server”| Command | What it does |
|---|---|
/status |
Shows uptime, ticks per second, tick time, memory use, players online, loaded chunks and entities, and the state of each plugin. |
/reload |
Reloads every plugin from disk and reads the resource packs again. |
/scriptevent <messageId> [message] |
Sends a message to plugins listening for script events. See Script events. |
stop |
Saves everything and shuts Basalt down. Terminal only. |
Reading /status is explained on the Performance page.
Development commands
Section titled “Development commands”Six more commands exist for trying out game mechanics while Basalt is being developed: /itemtest, /recipetest, /chesttest, /smithtest, /tune and /damageitem. They are operator-only, must be run by a player in game rather than from the terminal, and are not meant for everyday use.