Package kr.toxicity.model.api.event
Record Class ModelInteractAtEvent
java.lang.Object
java.lang.Record
kr.toxicity.model.api.event.ModelInteractAtEvent
- Record Components:
who- the player interactinghitbox- the hitbox being interacted withhand- the hand used for interactionposition- the relative position of the interaction
- All Implemented Interfaces:
ModelEvent
public record ModelInteractAtEvent(@NotNull PlatformPlayer who, @NotNull HitBox hitbox, @NotNull ModelInteractionHand hand, @NotNull org.joml.Vector3f position)
extends Record
implements ModelEvent
Triggered when a player interacts with a model's hitbox at a specific position.
This event provides the precise interaction coordinates relative to the hitbox.
- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionModelInteractAtEvent(@NotNull PlatformPlayer who, @NotNull HitBox hitbox, @NotNull ModelInteractionHand hand, @NotNull org.joml.Vector3f position) Creates an instance of aModelInteractAtEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull ModelInteractionHandhand()Returns the value of thehandrecord component.final inthashCode()Returns a hash code value for this object.@NotNull HitBoxhitbox()Returns the value of thehitboxrecord component.@NotNull org.joml.Vector3fposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.@NotNull PlatformPlayerwho()Returns the value of thewhorecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface kr.toxicity.model.api.event.ModelEvent
call
-
Constructor Details
-
ModelInteractAtEvent
public ModelInteractAtEvent(@NotNull @NotNull PlatformPlayer who, @NotNull @NotNull HitBox hitbox, @NotNull @NotNull ModelInteractionHand hand, @NotNull @NotNull org.joml.Vector3f position) Creates an instance of aModelInteractAtEventrecord class.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
who
Returns the value of thewhorecord component.- Returns:
- the value of the
whorecord component
-
hitbox
Returns the value of thehitboxrecord component.- Returns:
- the value of the
hitboxrecord component
-
hand
Returns the value of thehandrecord component.- Returns:
- the value of the
handrecord component
-
position
@NotNull public @NotNull org.joml.Vector3f position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-