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:
ObsidrelStateChangeEventidentifiesBLOCK,FURNITUREorENTITYand 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.