Class ProjectileLaunchEvent

java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.server.core.modules.projectile.event.ProjectileLaunchEvent

public class ProjectileLaunchEvent extends EcsEvent
Fired on the launching entity when one of its interaction chains spawns a projectile (the Projectile interaction), whether or not the projectile later hits anything. This is the moment a ranged weapon attack is released: a bow chain starts on the click but only launches when the draw is released, and never launches when the quiver is empty.
  • Constructor Details

    • ProjectileLaunchEvent

      public ProjectileLaunchEvent(@Nonnull Ref<EntityStore> projectileRef, @Nonnull InteractionType interactionType, boolean launchedByWeapon)
  • Method Details

    • getProjectileRef

      @Nonnull public Ref<EntityStore> getProjectileRef()
    • getInteractionType

      @Nonnull public InteractionType getInteractionType()
      Returns:
      the type of the chain that launched the projectile (Primary for a basic bow or crossbow shot).
    • isLaunchedByWeapon

      public boolean isLaunchedByWeapon()
      Returns:
      whether the launching chain ran with a weapon item in hand.