public class ProjectileHitEvent extends EntityEvent implements Cancellable
Event.Resultentity| Constructor and Description | 
|---|
ProjectileHitEvent(@NotNull Projectile projectile)  | 
ProjectileHitEvent(@NotNull Projectile projectile,
                  @Nullable Block hitBlock)  | 
ProjectileHitEvent(@NotNull Projectile projectile,
                  @Nullable Entity hitEntity)  | 
ProjectileHitEvent(@NotNull Projectile projectile,
                  @Nullable Entity hitEntity,
                  @Nullable Block hitBlock)  | 
ProjectileHitEvent(@NotNull Projectile projectile,
                  @Nullable Entity hitEntity,
                  @Nullable Block hitBlock,
                  @Nullable BlockFace hitFace)  | 
| Modifier and Type | Method and Description | 
|---|---|
@NotNull Projectile | 
getEntity()
Returns the Entity involved in this event 
 | 
static @NotNull HandlerList | 
getHandlerList()  | 
@NotNull HandlerList | 
getHandlers()  | 
@Nullable Block | 
getHitBlock()
Gets the block that was hit, if it was a block that was hit. 
 | 
@Nullable BlockFace | 
getHitBlockFace()
Gets the block face that was hit, if it was a block that was hit and the
 face was provided in the vent. 
 | 
@Nullable Entity | 
getHitEntity()
Gets the entity that was hit, if it was an entity that was hit. 
 | 
boolean | 
isCancelled()
Gets the cancellation state of this event. 
 | 
void | 
setCancelled(boolean cancel)
Whether to cancel the action that occurs when the projectile hits. 
 | 
getEntityTypecallEvent, getEventName, isAsynchronouspublic ProjectileHitEvent(@NotNull @NotNull Projectile projectile)
public ProjectileHitEvent(@NotNull @NotNull Projectile projectile, @Nullable @Nullable Entity hitEntity)
public ProjectileHitEvent(@NotNull @NotNull Projectile projectile, @Nullable @Nullable Block hitBlock)
public ProjectileHitEvent(@NotNull @NotNull Projectile projectile, @Nullable @Nullable Entity hitEntity, @Nullable @Nullable Block hitBlock)
@NotNull public @NotNull Projectile getEntity()
EntityEventgetEntity in class EntityEvent@Nullable public @Nullable Block getHitBlock()
@Nullable public @Nullable BlockFace getHitBlockFace()
@Nullable public @Nullable Entity getHitEntity()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
FireworkExplodeEvent).
 setCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2022. All rights reserved.