Skip to content

Commands

James Collins edited this page Jan 5, 2025 · 2 revisions

Command formatting

We use traditional formatting rules when describing the arguments for a command.

  • <arg>: Arguments wrapped in angle brackets are required. These can be separated by the pipe character | to show there are several options available, however at least 1 of these are required, ie: <create|delete|list>

  • [optional] Arguments listed in square brackets are optional

Examples:

  • /world <create|delete> <world>: This world command has 2 required arguments, create OR delete, and the world name to create or delete.
  • /world <create <world>|delete <world>|list>: This world command is showing that create OR delete OR list is required. Create or delete also require a world name, however list has no additional requirements.

The following commands are built into STEMCraftLib and available:

/hub [player]

Teleports the player to the hub world. You can optionally specify a player to teleport (required when run from the console).

/world

Create a new world on the server.

  • /world create <name>:[generator]:[arguments] [seed]
    • <name> The name of the world. The name must not exist on the server.
    • [generator] (Optional) The name of the chunk generator to use in world generation.
    • [arguments] (Optional) The arguments to send to the chunk generator. See the chunk generator documentation on how to use option.
    • [seed] (Optional) The world seed to use. An optional seed will be used if not provided.

Delete a world on the server. This is permanent and cannot be undone. Players currently in the world will be teleported to the default world.

  • /world delete <world>
    • <world> The name of the world. Must exist on the server. Cannot be default world.

Load a world on the server. The world must exist on the server.

  • /world load <world>
    • <world> The name of the world. Must exist on the server.

Unload a world on the server. Players currently in the world will be teleported to the default world.

  • /world unload <world>
    • <world> The name of the world. Must exist on the server. Cannot be default world.

List all the worlds on the server and their current status.

  • /list

Teleport to the world spawn.

  • /world spawn <world> [player]
    • <world> The world to teleport to world spawn. Must exist on the server and be loaded.
    • [player] (Optional) The player to teleport to world spawn. If not provided, the player running the command will be teleported. Required when run from the console.

Set the world spawn. This command cannot be run from the console.

  • /world setspawn [world] [player]
    • [world] (Optional) The world to update the world spawn location. If not provided, the world the player running the command is located in will be used.
    • [player] (Optional) The player location to use as the updated world spawn location. If not provided, the location of the player running the command will be used.

Copy a world

  • /world copy <target> <destination>
    • <target> The world to copy. Must exist on the server and be loaded.
    • <destination> The new world name. Must not exist on the server.

Get or Set a world autosave setting.

  • /world autosave [world] [enabled|disabled]
    • [world] (Optional) The world to get or set. If not provided, the world the player running the command is located in will be used. This is required when run from the console.
    • [enabled|disabled] (Optional) If provided, will enable or disable the world autosave.

Save a world.

  • /world save [world]
    • [world] (Optional) The world to save. If not provided, the world the player running the command is located in will be used. This is required when run from the console.

Get or Set a world bed respawn setting. When disabled, players will always respawn at world spawn.

  • /world bedrespawn [world] [enabled|disabled]
    • [world] (Optional) The world to get or set. If not provided, the world the player running the command is located in will be used. This is required when run from the console.
    • [enabled|disabled] (Optional) If provided, will enable or disable the player bed respawning.

Get or Set a world game-mode.

  • /world gamemode [world] [reset|survival|adventure|creative|spectator]
    • [world] (Optional) The world to get or set. If not provided, the world the player running the command is located in will be used. This is required when run from the console.
    • [reset|survival|adventure|creative|spectator] (Optional) If provided, will set this value as the default game-mode when entering the world. Resetting the value will not enforce any game-mode for players.

List world generators available on the server.

  • /world listgenerators

Clone this wiki locally