Interface HitBoxListener


public interface HitBoxListener
A listener of hit-box
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Builder
    static interface 
    On damage
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final HitBoxListener
    Empty listener
  • Method Summary

    Modifier and Type
    Method
    Description
    static @NotNull HitBoxListener.Builder
    Creates builder of hitbox listener
    boolean
    damage(@NotNull HitBox hitBox, @NotNull ModelDamageSource source, double damage)
    Listens to hit-box damage
    void
    dismount(@NotNull HitBox hitBox, @NotNull org.bukkit.entity.Entity entity)
    Listens to hit-box dismount
    void
    mount(@NotNull HitBox hitBox, @NotNull org.bukkit.entity.Entity entity)
    Listens to hit-box mount
    void
    remove(@NotNull HitBox hitBox)
    Listens to hit-box remove
    void
    sync(@NotNull HitBox hitBox)
    Listens to hit-box tick
    default @NotNull HitBoxListener.Builder
    Creates builder by original hitbox listener
  • Field Details

  • Method Details

    • builder

      @NotNull static @NotNull HitBoxListener.Builder builder()
      Creates builder of hitbox listener
      Returns:
      listener builder
    • toBuilder

      @NotNull default @NotNull HitBoxListener.Builder toBuilder()
      Creates builder by original hitbox listener
      Returns:
      listener builder
    • sync

      void sync(@NotNull @NotNull HitBox hitBox)
      Listens to hit-box tick
      Parameters:
      hitBox - target hit-box
    • damage

      boolean damage(@NotNull @NotNull HitBox hitBox, @NotNull @NotNull ModelDamageSource source, double damage)
      Listens to hit-box damage
      Parameters:
      hitBox - target hit-box
      source - damage source
      damage - damage
      Returns:
      cancel
    • remove

      void remove(@NotNull @NotNull HitBox hitBox)
      Listens to hit-box remove
      Parameters:
      hitBox - target hit-box
    • mount

      void mount(@NotNull @NotNull HitBox hitBox, @NotNull @NotNull org.bukkit.entity.Entity entity)
      Listens to hit-box mount
      Parameters:
      hitBox - target hit-box
      entity - entity
    • dismount

      void dismount(@NotNull @NotNull HitBox hitBox, @NotNull @NotNull org.bukkit.entity.Entity entity)
      Listens to hit-box dismount
      Parameters:
      hitBox - target hit-box
      entity - entity