OBSIDREL / DOCS

Documentation

Guides, tutorials and technical references for the Obsidrel ecosystem.

DocumentationListen to Obsidrel events

Listen to Obsidrel events

Obsidrel's public events are regular Bukkit/Paper events. You can handle them with listeners from an external plugin, or use AddonContext.registerListener(...) inside a native addon for automatic cleanup.

Two important event phases

  • PRE / cancellable: before the action is committed; cancelling can stop the Obsidrel-side effect.
  • POST / notification: after the change; it cannot be cancelled.

Available event families

  • Blocks and furniture: placement, breakage, interaction and seat changes.
  • Items, armor sets and cosmetics: use/damage/equip/unequip and set bonuses.
  • Entities: spawn, death, interaction and finished animation.
  • Gameplay: action execution, trigger firing, loot rolls and player-data changes.
  • State changes: ObsidrelStateChangeEvent identifies BLOCK, FURNITURE or ENTITY and their content/animation state transitions.

For a cancellable handler, check the specific event's public interface instead of assuming every event is cancellable. ObsidrelAnimationFinishEvent signals a finished authored ONCE animation; it does not provide a general callback for every animation tick.

Test carefully

Register a listener, create the corresponding content and perform its action in a test world. Confirm the event is emitted and that cancellation has the expected effect only for a cancellable PRE event.

Was this article helpful?Loading ratings…

Help us improve Obsidrel documentation. One vote per account and article. Discord AI feedback can also contribute when the answer cites this article.