Origin (Command)

Set, query and reroll a player's origin, and manage stored origin data.

Manages which origin each player has in each layer. Added by Origins, not Apoli, so it is only present when Origins is installed.

Sub-commands

Sub-commandWhat it does
set <targets> <layer> <origin>Assigns an origin.
revoke <targets> <layer> [origin]Takes an origin back. Without <origin>, clears the layer and its granted pool.
has <targets> <layer> <origin>Reports how many targets have it.
getPrints every online player’s origins.
get <target> <layer>Prints one player’s origin in a layer.
gui [<targets>] [<layer>]Clears every layer and reopens the choose-origin screen.
gui unchosen [<targets>]Opens the screen only for layers that are still unchosen, changing nothing else.
random [<targets>] [<layer>]Rerolls to a random origin.
orb [<targets>] <layer> [<origin>]Gives an Orb of Origin bound to that layer.
cap [list] [<layer>]Lists every capped origin with its holders.
cap clear [<layer>] [<origin>]Releases recorded origin claims.
storage …Stores and re-applies origins and values.

set

origin set @s origins:origin example:phoenix
origin set @a origins:origin origins:empty

Applies the origin’s powers immediately, syncs it to every client, and fires the origin-chosen callbacks. It refuses layers and origins that do not exist, and origins that are not part of the given layer — unless the origin is marked special.

The origin is pinned to that layer: a revalidate layer will not re-derive it from its conditions afterwards. origins:empty clears the layer and drops the pin, handing it back to its conditions:

origin set @s my_pack:device origins:empty

The return value is the number of targets that ended up on the requested origin, and any target that did not is named in a failure message — so a pack can tell a real assignment from one a layer’s conditions overrode.

On a swappable layer there is no origin to set, so set adds the origin to that player’s granted pool instead, and origins:empty clears their whole granted list for that layer. A pool grant is not checked against the layer’s origins list, so any loaded origin can be handed out this way.

revoke

origin revoke @s origins:origin example:wolf_form
origin revoke @s origins:origin

The first line takes one origin out of the player’s granted pool for that layer, or clears the layer if that origin was their pick. The second takes everything — the pick and the whole pool. A player currently swapped into a revoked origin is dropped back to their own origin.

has / get

origin has @a origins:origin example:phoenix
origin get
origin get @s origins:origin

has prints matched/total and returns the matched count, so it drops into /execute store. For plain filtering the origin selector option is usually shorter:

execute as @a[origin=example:phoenix] run say I am reborn

gui / random

origin gui
origin gui @a
origin gui @a origins:origin
origin gui unchosen @a
origin random @a
origin random @a origins:origin

gui clears every layer first, then opens the screen on the first layer that has anything to choose — the same reset the Orb of Origin performs, so it works on a player who already has an origin everywhere. Name a <layer> and only that layer’s screen is opened, leaving the rest alone.

gui unchosen is the non-destructive form: it opens the screen only when a layer is still unchosen and does nothing if the player has already picked on every layer. That is the right one for “finish setting up”, and gui is the right one for “start over”.

random rolls an origin immediately, honouring the layer’s random_allows_unchoosable setting. It defaults to every unchosen layer when no layer is given, and to the command’s own player when no targets are given. random skips swappable layers — a pool is not a choice; roll one with origins:force_swap instead.

orb

Gives an Orb of Origin that is bound to one layer, instead of the plain orb that wipes every layer at once.

origin orb origins:origin
origin orb @a my_pack:device
origin orb @a my_pack:device example:phoenix

With a layer alone, using the orb clears only that layer and opens its choose-origin screen — every other layer the player has is left untouched. Add an <origin> and the orb sets that layer to that origin directly, with no screen: a one-use ticket for a specific origin, which is otherwise not obtainable as an item.

The orb carries the layer and origin in its item data, so it stacks to one, keeps working after being dropped or traded, and shows what it does in its tooltip. Targets default to the player running the command; an orb that does not fit in the inventory is dropped at the player’s feet.

Swappable layers are refused — there is no origin to choose on a pool. The layer and, when given, the origin must both be loaded.

cap

Inspects and edits the ledger behind origin caps — the record of who holds which capped origin, kept in the world save so offline players keep their slot.

origin cap
origin cap list origins:origin
origin cap clear origins:origin example:dragonborn
origin cap clear origins:origin
origin cap clear

list prints one line per capped origin — <layer> / <origin>: taken/limit [names] — in red when it is full. It only lists origins that actually declare a cap, so an empty result means nothing on that layer is capped. The return value is the number of lines printed.

clear releases claims: with no arguments the whole ledger, with a layer that layer, with a layer and an origin just that one. Every online player’s claims are re-recorded immediately afterwards, so clearing only frees the slots held by players who are offline — an online holder keeps theirs until they change origin. That is what makes it the tool for reclaiming an origin from someone who has left the server for good.

storage

Origin storage is a per-player key/value store, used to stash an origin now and re-apply it later — body-swap powers, “remember what I was” mechanics, and the like. It is the command-side of origins:store_origin and origins:apply_stored_origin.

Sub-commandWhat it does
storage list <target>Prints every stored key.
storage get <target> <key>Prints one stored value.
storage store origin <target> <key> <source> [<layer>]Stores <source>’s origin under <key> on <target>.
storage store value <target> <key> <value>Stores an arbitrary string.
storage apply <target> <key> [<layer>]Applies a stored origin.
storage clear <target> [<key>]Clears one key, or all of them.
storage run <target> <command>Runs a command with <key> placeholders substituted from storage.
origin storage store origin @s previous @s
origin storage apply @s previous
origin storage list @s

Permissions

set, revoke, gui, random, orb, cap and storage need permission level 2 (nodes origins.command.origin.set — shared by revoke.gui, .random, .orb, .cap, .storage). has and get are open to everyone.