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