public class ProjectileCollideEvent extends EntityEvent implements Cancellable
This event is called before EntityDamageByEntityEvent, and cancelling it will allow the projectile to continue flying
Event.Resultentity| Constructor and Description |
|---|
ProjectileCollideEvent(@NotNull Projectile what,
@NotNull Entity collidedWith) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull Entity |
getCollidedWith()
Get the entity the projectile collided with
|
@NotNull Projectile |
getEntity()
Get the projectile that collided
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
getEntityTypecallEvent, getEventName, isAsynchronous@NotNull public @NotNull Entity getCollidedWith()
@NotNull public @NotNull Projectile getEntity()
getEntity in class EntityEvent@NotNull public static @NotNull HandlerList getHandlerList()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Eventpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this eventCopyright © 2021. All rights reserved.