Class DismountModelEvent

java.lang.Object
kr.toxicity.model.api.event.DismountModelEvent
All Implemented Interfaces:
CancellableEvent, ModelEvent

public final class DismountModelEvent extends Object implements CancellableEvent
Triggered when an entity dismounts from a model's hitbox.

This event allows plugins/mods to intercept and potentially cancel the dismounting process.

Since:
2.0.0
  • Constructor Details

    • DismountModelEvent

      @Internal public DismountModelEvent(@NotNull @NotNull EntityTracker tracker, @NotNull @NotNull RenderedBone bone, @NotNull @NotNull HitBox hitbox, @NotNull @NotNull PlatformEntity entity)
      Creates a new DismountModelEvent.
      Parameters:
      tracker - the entity tracker associated with the model
      bone - the bone associated with the hitbox
      hitbox - the hitbox being dismounted
      entity - the entity dismounting
      Since:
      2.0.0
  • Method Details

    • tracker

      @NotNull public @NotNull EntityTracker tracker()
      Returns the entity tracker associated with the model.
      Returns:
      the entity tracker
      Since:
      2.0.0
    • bone

      @NotNull public @NotNull RenderedBone bone()
      Returns the bone associated with the hitbox.
      Returns:
      the rendered bone
      Since:
      2.0.0
    • hitbox

      @NotNull public @NotNull HitBox hitbox()
      Returns the hitbox being dismounted.
      Returns:
      the hitbox
      Since:
      2.0.0
    • entity

      public PlatformEntity entity()
      Returns the entity dismounting the hitbox.
      Returns:
      the passenger entity
      Since:
      2.0.0