HitBoxListener

interface HitBoxListener

Listens for events related to a HitBox, such as damage, interaction, and mounting.

This interface allows for custom behavior when a hitbox is interacted with.

Since

1.15.2

Types

Link copied to clipboard
class Builder
Builder for HitBoxListener.

Properties

Link copied to clipboard
An empty listener that does nothing.

Functions

Link copied to clipboard
@NotNull
open fun builder(): @NotNull HitBoxListener.Builder
Creates a new builder for HitBoxListener.
Link copied to clipboard
@ApiStatus.Internal
abstract fun handle(@NotNull event: @NotNull HitBoxEvent): Boolean
Handles a hitbox event.
Link copied to clipboard
@ApiStatus.Internal
abstract fun sync(@NotNull hitBox: @NotNull HitBox)
Handles tick method.
Link copied to clipboard
@NotNull
abstract fun toBuilder(): @NotNull HitBoxListener.Builder
Creates a builder initialized with this listener's current handlers.