Package kr.toxicity.model.api.nms
Interface HitBox
- All Superinterfaces:
Identifiable
Gets hit-box
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoiddismount(@NotNull org.bukkit.entity.Entity entity) Dismounts this hit-boxvoidDismounts all passengersbooleanCheck dismount call is forced by HitBox#dismount(Entity)@NotNull BoneNameGets bone namedefault booleanGets this hit-box has been controlled by another entitybooleanGets this hit-box has a mount driver.voidhide(@NotNull org.bukkit.entity.Player player) Hides this hitbox from player@NotNull HitBoxListenerlistener()Gets hit-box listenervoidmount(@NotNull org.bukkit.entity.Entity entity) Mounts this hit-box@NotNull MountControllerGets mount controllervoidmountController(@NotNull MountController controller) Sets mount controllerbooleanonWalk()Checks passenger of this hit-box is on walk@NotNull RenderedBoneGets a position source of this hitbox.default @NotNull Optional<EntityTrackerRegistry> registry()Gets this hitbox's tracker.@NotNull org.joml.Vector3fGets relative position for source entityvoidRemoves this hit-box It differs from Entity#remove because it is thread-safevoidshow(@NotNull org.bukkit.entity.Player player) Shows this hitbox to player@NotNull org.bukkit.entity.Entitysource()Gets source entityvoidtriggerInteract(@NotNull org.bukkit.entity.Player player, @NotNull ModelInteractionHand hand) Triggers interact with this hitboxvoidtriggerInteractAt(@NotNull org.bukkit.entity.Player player, @NotNull ModelInteractionHand hand, @NotNull org.bukkit.util.Vector position) Triggers interact with this hitboxMethods inherited from interface kr.toxicity.model.api.nms.Identifiable
id, uuid
-
Method Details
-
triggerInteract
@Internal void triggerInteract(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ModelInteractionHand hand) Triggers interact with this hitbox- Parameters:
player- playerhand- hand
-
triggerInteractAt
@Internal void triggerInteractAt(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull ModelInteractionHand hand, @NotNull @NotNull org.bukkit.util.Vector position) Triggers interact with this hitbox- Parameters:
player- playerhand- handposition- position
-
hide
@Internal void hide(@NotNull @NotNull org.bukkit.entity.Player player) Hides this hitbox from player- Parameters:
player- target
-
show
@Internal void show(@NotNull @NotNull org.bukkit.entity.Player player) Shows this hitbox to player- Parameters:
player- target
-
groupName
Gets bone name- Returns:
- name
-
mountController
Gets mount controller- Returns:
- controller
-
mountController
Sets mount controller- Parameters:
controller- controller
-
onWalk
boolean onWalk()Checks passenger of this hit-box is on walk- Returns:
- on walk
-
source
@NotNull @NotNull org.bukkit.entity.Entity source()Gets source entity- Returns:
- source
-
mount
void mount(@NotNull @NotNull org.bukkit.entity.Entity entity) Mounts this hit-box- Parameters:
entity- target entity
-
hasMountDriver
boolean hasMountDriver()Gets this hit-box has a mount driver.- Returns:
- has a mount driver
-
hasBeenControlled
default boolean hasBeenControlled()Gets this hit-box has been controlled by another entity- Returns:
- has been controlled
-
dismount
void dismount(@NotNull @NotNull org.bukkit.entity.Entity entity) Dismounts this hit-box- Parameters:
entity- dismount
-
dismountAll
void dismountAll()Dismounts all passengers -
forceDismount
boolean forceDismount()Check dismount call is forced by HitBox#dismount(Entity)- Returns:
- force dismount
-
relativePosition
@NotNull @NotNull org.joml.Vector3f relativePosition()Gets relative position for source entity- Returns:
- relative position
-
removeHitBox
void removeHitBox()Removes this hit-box It differs from Entity#remove because it is thread-safe -
listener
Gets hit-box listener- Returns:
- listener
-
positionSource
Gets a position source of this hitbox.- Returns:
- source
-
registry
Gets this hitbox's tracker.- Returns:
- tracker
-