Class HitBoxListener.Builder

java.lang.Object
kr.toxicity.model.api.nms.HitBoxListener.Builder
Enclosing interface:
HitBoxListener

public static class HitBoxListener.Builder extends Object
Builder for HitBoxListener.
Since:
1.15.2
  • Method Details

    • sync

      @NotNull public @NotNull HitBoxListener.Builder sync(@NotNull @NotNull Consumer<HitBox> sync)
      Adds a sync handler.
      Parameters:
      sync - the sync consumer
      Returns:
      this builder
      Since:
      1.15.2
    • damage

      @NotNull public @NotNull HitBoxListener.Builder damage(@NotNull @NotNull HitBoxListener.OnDamage damage)
      Adds a damage handler.
      Parameters:
      damage - the damage handler
      Returns:
      this builder
      Since:
      1.15.2
    • remove

      @NotNull public @NotNull HitBoxListener.Builder remove(@NotNull @NotNull Consumer<HitBox> remove)
      Adds a remove handler.
      Parameters:
      remove - the remove consumer
      Returns:
      this builder
      Since:
      1.15.2
    • mount

      @NotNull public @NotNull HitBoxListener.Builder mount(@NotNull @NotNull BiConsumer<HitBox,PlatformEntity> mount)
      Adds a mount handler.
      Parameters:
      mount - the mount consumer
      Returns:
      this builder
      Since:
      1.15.2
    • dismount

      @NotNull public @NotNull HitBoxListener.Builder dismount(@NotNull @NotNull BiConsumer<HitBox,PlatformEntity> dismount)
      Adds a dismount handler.
      Parameters:
      dismount - the dismount consumer
      Returns:
      this builder
      Since:
      1.15.2
    • build

      @NotNull public @NotNull HitBoxListener build()
      Builds the listener.
      Returns:
      the created listener
      Since:
      1.15.2