Cancellable
public class EntityShootBowEvent extends EntityEvent implements Cancellable
Event.Result
entity
Constructor | Description |
---|---|
EntityShootBowEvent(LivingEntity shooter,
ItemStack bow,
Projectile projectile,
float force) |
Deprecated.
|
EntityShootBowEvent(LivingEntity shooter,
ItemStack bow,
ItemStack arrowItem,
Projectile projectile,
float force) |
Modifier and Type | Method | Description |
---|---|---|
ItemStack |
getArrowItem() |
|
ItemStack |
getBow() |
Gets the bow ItemStack used to fire the arrow.
|
boolean |
getConsumeArrow() |
|
LivingEntity |
getEntity() |
Returns the Entity involved in this event
|
float |
getForce() |
Gets the force the arrow was launched with
|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
Entity |
getProjectile() |
Gets the projectile which will be launched by this event
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
void |
setConsumeArrow(boolean consumeArrow) |
|
void |
setProjectile(Entity projectile) |
Replaces the projectile which will be launched
|
getEntityType
callEvent, getEventName, isAsynchronous
@Deprecated public EntityShootBowEvent(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @NotNull Projectile projectile, float force)
public EntityShootBowEvent(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @NotNull ItemStack arrowItem, @NotNull Projectile projectile, float force)
public void setConsumeArrow(boolean consumeArrow)
public boolean getConsumeArrow()
@NotNull public ItemStack getArrowItem()
@NotNull public LivingEntity getEntity()
EntityEvent
getEntity
in class EntityEvent
@Nullable public ItemStack getBow()
@NotNull public Entity getProjectile()
public void setProjectile(@NotNull Entity projectile)
projectile
- the new projectilepublic float getForce()
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 event@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.