Slash commands

Slash commands are strings that start with /. By entering a slash command in the comment box, you can execute various functions.

The slash commands you send and their results are not visible to other users.

Slash commands can be enabled from the developer menu.

List of slash commands

Some slash commands require parameters to be specified. Commands and parameters must be separated by a single space.

Some commands allow you to read and write internal data of spaces or items (like $.state). Only the content creator can execute these types of commands.

Commands available to all users

  • /help
    • Displays a list of slash commands.

Commands executable only by the world’s creator

  • /getmyposition
    • Displays your current coordinates.
    • Shortcut: /getmypos
  • /item destroy itemID
    • Deletes the item specified by itemID. World-placed items cannot be deleted.
  • /item owner itemID
    • Displays the user ID of the current Owner of the item specified by itemID in the console.
  • /items
  • /respawn
    • Respawns your character.
  • /users
    • Displays a list of user IDs in the space in the console. The displayed IDs are the same as those retrievable by PlayerHandle.id.
  • /warp x y z
    • Warps you to the coordinates specified by (x, y, z).

Commands executable only by the item’s creator

  • /item state itemID
    • Displays a list of states set on the item specified by itemID in the console.
  • /item state itemID key
    • Displays the value retrievable by key set in the state of the item specified by itemID in the console.
  • /item state itemID key type value
    • Writes a value to the state of the item specified by itemID where the property name is key and the type is type. For type, specify one of the following strings corresponding to each Sendable type, or null:
      • number: Corresponds to a number
      • string: Corresponds to a string
      • bool: Corresponds to a boolean
      • vec2: Corresponds to Vector2
      • vec3: Corresponds to Vector3
      • quaternion: Corresponds to Quaternion
      • playerHandle: Corresponds to PlayerHandle
      • itemHandle: Corresponds to ItemHandle
      • array: Corresponds to an array
      • object: Corresponds to an object

Syntax for value

The syntax rules for generating value used in commands like /item are as follows:

  • <value> -> <null> | <number> | <bool> | <string> | <vec2> | <vec3> | <quaternion> | <itemHandle> | <playerHandle> | <array> | <object>
  • <null> -> null
  • <number> -> A number | NaN | Infinity | -Infinity
  • <bool> -> true | false
  • <string> -> “<string_element>
    • <string_element> -> A string
  • <vec2> -> (<number> <number>)
  • <vec3> -> (<number> <number> <number>)
  • <quaternion> -> (<number> <number> <number> <number>)
  • <itemHandle> -> item-<itemId>
    • <itemId> -> A string equivalent to what can be retrieved by ItemHandle.id
  • <playerHandle> -> player-<playerId>
    • <playerId> -> A string equivalent to what can be retrieved by PlayerHandle.id
  • <array> -> [<array_element>]
    • <array_element> -> ε | <value> | <value> <array_element>
  • <object> -> {<object_element>}
    • <object_element> -> ε | <object_key>:<value> | <object_key>:<value> <object_element>
    • <object_key> -> A string without spaces

Example notation

{targetPlayer:player-a0a-b1b-c2c-d3d-e4e playerName:"player01" position:(1.5 0 -2.5) equipments:[item-12345 item-67890]}

This is an object with four properties:

  • key: targetPlayer, value: A PlayerHandle for the player with ID a0a-b1b-c2c-d3d-e4e
  • key: playerName, value: The string "player01"
  • key: position, value: The Vector3 (1.5, 0, -2.5)
  • key: equipments, value: An array with two elements: ItemHandle for the items with IDs 12345 and 67890