Skip to content

Chat commands

The server answers a set of chat commands itself, in every game mode, so testing and admin commands never depend on the mode script — and a server owner can switch them off and run their own.

A / line goes through, in order:

  1. /register and /login — the accounts, always the server’s;
  2. /fight and /peace — the server’s own, always;
  3. the game mode: OnPlayerCommandText(pid, cmd, args); true = handled, stop here;
  4. the built-ins below;
  5. Unknown command: /x.

A mode overrides any built-in by handling its name and returning true — its own /give with its own rules. A mode’s /help that prints a line and returns false is followed by the server’s list.

Public by default:

Command What it does
/help what the caller may use
/pos the caller’s position and yaw
/players who is online
/items <part of a name> search the item catalogue (the first eight matches, with ids)
/uptime how long the server has been up

Admins only ([accounts] admins, or a player a mode promoted with SetPlayerAdmin; everyone else reads “Admins only.”):

Command What it does
/give <name|id|guid|English name> [n] an item into the caller’s inventory
/item <key> a pickup of that item in front of the caller
/tp x y z, /tp <player> teleport
/goto <player> teleport next to a player
/horse [soul] the horse next to you, yours called over, or a new one; with a soul named, a new one of that breed
/horses <part of a name> search the horse breeds
/prop <mesh> [scale] [rigid], /props <part of a path> place a static mesh; search the meshes
/time [hh:mm] read or set the world clock
/rain [0-1|off] force rain, or give the weather back to the level
/weather [preset|profile] [blend s] the sky’s preset; alone, lists them
/reload hot-reload the game mode
/heal [player] whole and sober (HealPlayer)
/kick <player> [reason]
/kickban <player> [minutes] kick and ban the name and address
/unban <name|address>
server.toml
[commands]
builtin = true # false = no built-ins at all (the mode's commands only)
public = ["help", "pos", "players", "items", "uptime"] # anyone; every other built-in answers admins only
disabled = [] # built-ins switched off by name, e.g. ["horse", "rain"]

A name is open until a player claims it in the chat with /register <password>. From then on whoever joins under it spawns held apart — frozen in a virtual world of their own, nobody in sight, the chat open — and plays as a guest with no record and no admin flag until /login <password> moves them into the shared world. After login_grace_seconds (180 by default) an unauthenticated registered name is kicked; three wrong passwords kick too. The password is stored as a salted PBKDF2-SHA256 hash in the player record; the record of a registered name is written for its owner only.

server.toml
[accounts]
admins = ["Henry", "Hans"] # registered names with admin powers, for the session they log in
registration = true # false closes new registrations
login_hold = true # false spawns an unauthenticated registered name among everyone instead
login_grace_seconds = 180

The two commands are the server’s own — handled before OnPlayerText, never echoed, never logged with their argument. A mode sees the result through OnPlayerLogin(pid), IsPlayerRegistered(pid), IsPlayerLoggedIn(pid) and IsPlayerAdmin(pid); SetPlayerAdmin(pid, true) promotes a player for the session from a script.