listener

@NotNull
abstract fun listener(): @NotNull HitBoxListener

Returns the listener associated with this hitbox.

Return

the listener

Since

1.15.2


@ApiStatus.Internal
abstract fun listener(@NotNull listener: @NotNull HitBoxListener)

Sets the listener for this hitbox.

Since

3.0.2

Parameters

listener

the new listener


open fun listener(@NotNull function: @NotNull (HitBoxListener.Builder) -> HitBoxListener.Builder)

Updates the listener for this hitbox using a builder function.

This method retrieves the current listener, converts it to a builder, applies the provided function, and sets the resulting listener.

Since

3.0.2

Parameters

function

the function to apply to the builder