Skip to content

Commands

BetterSpawn Dev edited this page Oct 24, 2026 · 3 revisions

Commands

All commands live under /betterspawn. /gotodim is registered both as a top-level command and as /betterspawn gotodim.

Argument order

For the setter commands, the order is intentionally:

<pos> <angle> <dimension>

The dimension is normally placed last. /gotodim also accepts the dimension as the first argument for compatibility.

Omitted values default to:

  • dimension: the source/player's current dimension
  • position: the player's feet position
  • angle: the player's current yaw

pos suggestions include ~ ~ ~, which resolves to the player's feet.

/betterspawn worldspawn

Requires permission level 2.

/betterspawn worldspawn global [<pos>] [<angle>] [<dimension>]
/betterspawn worldspawn player <targets> [<pos>] [<angle>] [<dimension>]
/betterspawn worldspawn clear [<dimension>] [<targets>]
/betterspawn worldspawn query [<dimension>] [<target>]
/betterspawn worldspawn regenerate [<dimension>]
/betterspawn worldspawn spawn_dimension [<dimension>]
/betterspawn worldspawn list
/betterspawn worldspawn reload

global

Sets the per-dimension default spawn.

/betterspawn worldspawn global ~ ~ ~ 0 minecraft:the_nether

With no arguments it uses the current dimension, the player's feet, and current yaw. For the Overworld, the spawn is also written to level.dat.

player

Sets a player's personal world spawn for a dimension.

/betterspawn worldspawn player Dev ~ ~ ~ 0 minecraft:the_nether

clear

  • Without targets: clears the dimension's global spawn.
  • With targets: clears those players' personal world spawn in the dimension.

query

  • Without a target: shows the global spawn (Overworld reads level.dat as the authority).
  • With a target: shows that player's personal world spawn in the dimension.

regenerate

Clears the dimension's stored default spawn and runs the JSON template again. If the template fails, the platform fallback runs.

spawn_dimension

Experimental. With no argument, shows the world's spawn dimension. With a dimension, sets the dimension new players are teleported to on their first join.

list

Lists loaded templates and their method/fallback.

reload

Triggers a datapack reload; the template listener reloads spawn_rules.

/betterspawn spawnpoint

Requires permission level 2.

/betterspawn spawnpoint set <targets> [<pos>] [<angle>] [<dimension>]
/betterspawn spawnpoint bed <targets> [<pos>] [<angle>] [<dimension>]
/betterspawn spawnpoint anchor <targets> [<pos>] [<angle>] [<dimension>]
/betterspawn spawnpoint clear <targets> [command|bed|anchor|all]
/betterspawn spawnpoint query <target>
  • set writes the command slot. It can also sync the vanilla respawn NBT depending on general.syncVanillaNbt.
  • bed and anchor are debug commands; they validate that the target block is a valid bed / charged respawn anchor.
  • clear removes one or all slots.
  • query shows personal dimension spawns and command/bed/anchor slots.

Command/bed/anchor slots are per-player and can point to a different dimension than the death dimension. They are validated again on respawn.

/gotodim

Runs the search without persisting a spawn.

/gotodim [simulate|teleport|verify] [--method <id>] [--params <json>]
         [--seed <n>] [--repeat <n>] [--timeout <ticks>] [--verbose] [--all]
         [<dimension>]

A template can opt in to following the dimension's current global spawn by setting allow_position_overwrite: true in its parameters. The Overworld reads the spawn from level.dat; other dimensions read WorldSpawnData. With that flag, changing the spawn with /betterspawn worldspawn global takes effect immediately in gotodim: search methods receive the new center_x/center_z, while fixed/platform receive the new coordinates. Without the flag the template's own position is used. All built-in vanilla templates set it to true.

Pass position parameters in --params to override the template for one run, for example --params {"center_x":0,"center_z":0}. For fixed/platform, pass x/y/z.

Modes:

  • simulate (default): resolves and prints, does not persist or move the player.
  • teleport: resolves and teleports the player; requires permission 2.
  • verify: teleports, waits about 3 seconds, then checks ground/liquid/void/distance.

Options:

  • --method <id>: overrides the method for this run.
  • --params <json>: merges parameters into the rule's current parameters.
  • --seed <n>: overrides the search seed.
  • --repeat <n>: runs 1-100 times and prints success/fallback/time stats.
  • --timeout <ticks>: search deadline in ticks.
  • --verbose: prints the ring trace.
  • --all: runs every loaded dimension in simulate mode.

Examples:

/betterspawn gotodim simulate
/betterspawn gotodim minecraft:the_nether simulate --verbose
/betterspawn gotodim simulate --method cave --params {"min_y":32,"max_y":120} minecraft:the_nether
/betterspawn gotodim minecraft:the_end teleport --verbose
/betterspawn gotodim --all --verbose

simulate is permission 0; teleport/verify require permission 2. The command is controlled by debug.enableGotoDim.

Permissions

Command Permission
worldspawn ... 2
spawnpoint ... 2
/gotodim ... simulate 0
/gotodim ... teleport/verify 2

Clone this wiki locally