Pipeline Tails
Tails run after every chain link. They apply the side effects: dropping items, giving items to the player, logging. Tails execute in YAML insertion order and each receives the same PipelineContext the previous tail left behind.
A pipeline without tails will mutate context state but never actually grant the player anything — the captured drops sit in the context list and are discarded when the pipeline run ends.
drop
Drops every ItemStack in context.drops() naturally at context.location() (falls back to the player's location if no location was captured). Awards context.vanillaExperience() to the player. Clears both state fields after the work is done.
Field | Type | Description |
|---|---|---|
|
| Drop materials skipped by this tail. |
|
| If non-empty, only listed materials are dropped. |
Both filters are applied per-stack. Items filtered out are dropped from the context state — a later tail will not see them. If you want filtered items to survive, run the filtered tail before an unfiltered one.
magnet
Adds every ItemStack in context.drops() directly to the player's inventory. Anything that doesn't fit (inventory full, filtered out) is kept in context.drops() so a subsequent drop tail can spill the remainder on the ground. Also awards context.vanillaExperience() to the player and zeroes it out.
Field | Type | Description |
|---|---|---|
|
| Drop materials skipped by the magnet (kept in context for later tails). |
|
| If non-empty, only listed materials are magnet-collected. |
A common pattern is magnet followed by drop:
The magnet collects what fits; the drop spills whatever the player's inventory could not hold.
mailbox
Sends every ItemStack in context.drops() to the player's mailbox via AstralCore's MailboxService (giveOrAdd, async), then clears context.drops(). No-op when the drop list is empty; failures are logged.
No configurable fields. A useful pattern is magnet → mailbox: the magnet grants what fits in the inventory, and the mailbox catches whatever is left over instead of spilling it on the ground.
debug
Dumps the current PipelineContext to the server console at INFO level. No configurable fields.
Output looks like:
Useful while authoring a new pipeline. Remove it before going live — every fired event logs.