Contents
Class ProjectileLaunchEvent
java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.server.core.modules.projectile.event.ProjectileLaunchEvent
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 Summary
ConstructorsConstructorDescriptionProjectileLaunchEvent(Ref<EntityStore> projectileRef, InteractionType interactionType, boolean launchedByWeapon) -
Method Summary
Modifier and TypeMethodDescriptionboolean
-
Constructor Details
-
ProjectileLaunchEvent
public ProjectileLaunchEvent(@Nonnull Ref<EntityStore> projectileRef, @Nonnull InteractionType interactionType, boolean launchedByWeapon)
-
-
Method Details
-
getProjectileRef
-
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.
-