Astral Realms Documentation Help

Pipeline Heads

A pipeline head is the entry point of a pipeline — it subscribes to a Bukkit event and, when the event fires for a matching custom item, populates a fresh PipelineContext with the data the rest of the pipeline will work on.

Every head's class carries a @PipelineHeadMeta annotation that declares the target Bukkit event and the event priority used when registering the dummy listener.

If a head returns false from handle() the pipeline is aborted — chain links and tails do not run.

block-break

Event: BlockBreakEventpriority: HIGH

Captures broken blocks: it replaces their natural drops with an empty drop list (drops are accumulated in the context instead, then handed off to tails) and stores the block, its location, and the natural XP. On top of the single broken block it also, by default:

  • empties the contents of a broken container (chest, barrel, …) into the drop list — the correct half of a double chest is handled; shulker boxes are left intact so they keep their contents;

  • adds a broken bed's placement item to the drops;

  • breaks the whole vertical column of a broken stackable plant (SUGAR_CANE, BAMBOO, KELP, CACTUS) and captures its drops + XP;

  • breaks any attached / physics-dependent blocks that would pop off (torches, rails, …) and captures their drops + XP.

Each of those extra breaks fires a virtual BlockBreakEvent so protection plugins can veto them.

head: type: "block-break" blacklist: [DIRT, GRAVEL] whitelist: [STONE, COBBLESTONE, IRON_ORE] allowed-tags: - "minecraft:coal_ores" disable-stacked-blocks: false disable-physics: false ignored: [TORCH]

Field

Type

Description

blacklist

List<Material>

Block types that abort the pipeline.

whitelist

List<Material>

If non-empty, only listed materials trigger the pipeline.

allowed-tags

List<Tag<Material>>

If non-empty, the broken block must match at least one tag or the pipeline aborts. See Material tags.

disable-stacked-blocks

boolean

Default false. When false, breaking a stackable plant also breaks the column above it; set true to break only the clicked block.

disable-physics

boolean

Default false. When false, attached blocks that lose support are also broken; set true to leave them in place.

ignored

List<Material>

Materials skipped by the stacked-block and physics sweeps (combined with the global physics-ignored config list).

The head sets event.setDropItems(false) and event.setExpToDrop(0) — tails are then responsible for dropping the items back on the ground (drop), giving them to the player (magnet), or mailing them (mailbox). Without a tail the broken block silently disappears.

entity-damage

Event: EntityDamageByEntityEventpriority: HIGH

Captures entity damage and optionally rescales it. Stores the damaged entity in context.

head: type: "entity-damage" multiplier: 1.5 entity-types: [ZOMBIE, SKELETON] ignore-sweep-attack: true player-damager: true

Field

Type

Description

multiplier

PlaceholderWrapper<Double>

If set, multiplies event.getDamage() by this value.

entity-types

List<EntityType>

If non-empty, only listed entity types trigger the pipeline.

ignore-sweep-attack

PlaceholderWrapper<Boolean>

If true, sweep attacks (ENTITY_SWEEP_ATTACK) are skipped.

player-damager

PlaceholderWrapper<Boolean>

If true, the head only triggers when the damager is a Player.

entity-kill

Event: EntityDeathEventpriority: HIGH

Captures the killed entity's natural drops and XP into the context, clearing them on the event. Records entity, location, and vanillaExperience.

head: type: "entity-kill" entity-types: [ENDER_DRAGON, WITHER] cancel-event: true

Field

Type

Description

entity-types

List<EntityType>

If non-empty, only listed entity types trigger the pipeline.

cancel-event

PlaceholderWrapper<Boolean>

If true, event.setCancelled(true) after capture.

Skips the pipeline if the kill has no killer (the entity died without a player credited).

bucket-entity

Event: PlayerBucketEntityEventpriority: HIGH

Fires when the item is used to bucket an entity (axolotl, fish, …). Stores the entity and its location.

head: type: "bucket-entity" cancel-event: false

Field

Type

Description

cancel-event

PlaceholderWrapper<Boolean>

If true, cancels the underlying bucket event.

fish

Event: PlayerFishEventpriority: HIGH

Fires only when the fishing state is CAUGHT_FISH and the caught entity is an Item. Adds the caught ItemStack to drops and sets location to the hook position.

head: type: "fish"

No configurable fields.

interact

Event: PlayerInteractEventpriority: HIGH

Fires on left- or right-click of a block or air. Filters by action and target block material.

head: type: "interact" whitelist: [CAULDRON] actions: [RIGHT_CLICK_BLOCK] needs-block: true cancel-event: true

Field

Type

Description

whitelist

List<Material>

If non-empty, only listed block materials trigger the pipeline.

actions

List<Action>

If non-empty, only the listed org.bukkit.event.block.Action values trigger the pipeline.

needs-block

boolean

If true, skips the pipeline when no block was clicked (air-click).

cancel-event

boolean

If true, cancels the underlying interact event after the head succeeds.

interact-entity

Event: PlayerInteractAtEntityEventpriority: HIGH

Fires on right-clicking an entity. Stores the entity in context.

head: type: "interact-entity" whitelist: [VILLAGER, WANDERING_TRADER] blacklist: [ARMOR_STAND]

Field

Type

Description

blacklist

List<EntityType>

Entity types that abort the pipeline.

whitelist

List<EntityType>

If non-empty, only listed entity types trigger the pipeline.

equip-hand

Event: HandEquipEventpriority: HIGH

Fires when the custom item enters the player's main hand (also fires on interaction with item frames / armour stands and on quit; see the event docs).

head: type: "equip-hand"

No configurable fields — the head simply opens the pipeline so chain links can run on equip.

drag-and-drop

Event: InventoryClickEventpriority: HIGH

Fires when the player drags one item onto another in any inventory. The pipeline runs on the slot item (the item in the clicked slot, which is context.itemStack()) and exposes the cursor item through a DragAndDropContext extra context.

Common use cases:

  • Consumable upgrade orbs that mutate the slot item (e.g. a repair orb dropped onto a damaged tool).

  • Tools that "store" a material picked up from the cursor (e.g. a build wand that remembers which block to place).

head: type: "drag-and-drop" cancel-event: true tags: - "upgrade-orb"

Field

Type

Description

cancel-event

PlaceholderWrapper<Boolean>

If true, cancels the underlying click event after the head succeeds.

tags

List<String>

If non-empty, the head only fires when the cursor item's blueprint metadata.tags contains at least one of the listed tags. Use to restrict which items can be dropped onto this one.

The head is skipped if the cursor is empty or — when tags is set — the cursor is not a custom item or none of its blueprint tags match.

harvest-block

Event: PlayerHarvestBlockEventpriority: HIGH

Fires when a player harvests a block that drops items without breaking (sweet-berry bushes, cave vines, …). Captures the harvested block, its drops, and the hand slot, then clears the event's harvested items so the drops flow to tails instead.

head: type: "harvest-block" cancel-event: false allowed-tags: - "minecraft:crops"

Field

Type

Description

cancel-event

PlaceholderWrapper<Boolean>

If true, cancels the underlying harvest event after capture.

allowed-tags

List<Tag<Material>>

If non-empty, the harvested block must match at least one tag or the pipeline aborts. See Material tags.

shear-block

Event: PlayerShearBlockEventpriority: HIGH

Fires when the item is used to shear a block (pumpkin, beehive, …). Captures the block, its drops, and the hand slot; the natural drops are cleared so they flow through the pipeline to tails.

head: type: "shear-block"

No configurable fields.

shear-entity

Event: PlayerShearEntityEventpriority: HIGH

Fires when the item is used to shear an entity (sheep, mooshroom, …). Captures the entity, its drops, and the hand slot; the natural drops are replaced with an empty list so they flow to tails.

head: type: "shear-entity"

No configurable fields.

equip-armor

Event: ArmorEquipEventpriority: HIGH

Fires when the custom item is equipped into an armour slot. Stores the item and its EquipmentSlot — no drops, block, or entity are captured, so this head is meant for running links on equip (e.g. execute-actions, attribute buffs).

head: type: "equip-armor"

No configurable fields.

unequip-armor

Event: ArmorUnEquipEventpriority: HIGH

The counterpart to equip-armor: fires when the custom item leaves an armour slot. Stores the item and its EquipmentSlot.

head: type: "unequip-armor"

No configurable fields.

Material tags

Fields typed List<Tag<Material>> (such as allowed-tags) accept Bukkit material tags in two forms. The registry defaults to blocks, and an unresolvable tag key fails to load:

allowed-tags: - "minecraft:logs" # short form — a namespaced key, registry defaults to "blocks" - key: "minecraft:leaves" # explicit form registry: "blocks"

Shared base fields

Every head inherits two base fields from PipelineHead:

Field

Type

Description

ignore-cancel

boolean

If true, the head still runs when the underlying event is already cancelled by another plugin. Defaults to false.

use-hook

boolean

Reserved field. Currently unused by the runtime.

The @PipelineHeadMeta(checkItem = false) annotation also exists for declaring item-agnostic global hooks (the head fires for every event of its type, not just events carrying a matching custom item). No built-in head uses it today — see PipelineContext › How a pipeline gets wired up.

Last modified: 25 July 2026