Class MountModelEvent

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

public final class MountModelEvent extends Object implements CancellableEvent
Triggered when an entity mounts a model's hitbox.

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

Since:
2.0.0
  • Constructor Details

    • MountModelEvent

      @Internal public MountModelEvent(@NotNull @NotNull EntityTracker tracker, @NotNull @NotNull RenderedBone bone, @NotNull @NotNull HitBox hitBox, @NotNull @NotNull PlatformEntity entity)
      Creates a new MountModelEvent.
      Parameters:
      tracker - the entity tracker associated with the model
      bone - the bone associated with the hitbox
      hitBox - the hitbox being mounted
      entity - the entity attempting to mount
      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 mounted.
      Returns:
      the hitbox
      Since:
      2.0.0
    • entity

      public PlatformEntity entity()
      Returns the entity attempting to mount the hitbox.
      Returns:
      the passenger entity
      Since:
      2.0.0