Class DismountModelEvent
java.lang.Object
kr.toxicity.model.api.event.DismountModelEvent
- All Implemented Interfaces:
CancellableEvent, ModelEvent
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 Summary
ConstructorsConstructorDescriptionDismountModelEvent(@NotNull EntityTracker tracker, @NotNull RenderedBone bone, @NotNull HitBox hitbox, @NotNull PlatformEntity entity) Creates a new DismountModelEvent. -
Method Summary
Modifier and TypeMethodDescription@NotNull RenderedBonebone()Returns the bone associated with the hitbox.entity()Returns the entity dismounting the hitbox.@NotNull HitBoxhitbox()Returns the hitbox being dismounted.@NotNull EntityTrackertracker()Returns the entity tracker associated with the model.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CancellableEvent
call, isCancelled, setCancelled
-
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 modelbone- the bone associated with the hitboxhitbox- the hitbox being dismountedentity- the entity dismounting- Since:
- 2.0.0
-
-
Method Details
-
tracker
Returns the entity tracker associated with the model.- Returns:
- the entity tracker
- Since:
- 2.0.0
-
bone
Returns the bone associated with the hitbox.- Returns:
- the rendered bone
- Since:
- 2.0.0
-
hitbox
Returns the hitbox being dismounted.- Returns:
- the hitbox
- Since:
- 2.0.0
-
entity
Returns the entity dismounting the hitbox.- Returns:
- the passenger entity
- Since:
- 2.0.0
-