public class EntityShootBowEvent extends EntityEvent implements Cancellable
Event.Result
entity
Constructor and Description |
---|
EntityShootBowEvent(LivingEntity shooter,
ItemStack bow,
ItemStack arrowItem,
Projectile projectile,
float force) |
EntityShootBowEvent(LivingEntity shooter,
ItemStack bow,
ItemStack arrowItem,
Projectile projectile,
float force,
boolean consumeArrow) |
EntityShootBowEvent(LivingEntity shooter,
ItemStack bow,
Projectile projectile,
float force)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
ItemStack |
getArrowItem() |
ItemStack |
getBow()
Gets the bow ItemStack used to fire the arrow.
|
boolean |
getConsumeArrow()
Gets if an arrow will be consumed if arrow is fired
|
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)
Sets if an arrow will be consumed if arrow is fired
|
void |
setProjectile(Entity projectile)
Replaces the projectile which will be launched
|
getEntityType
callEvent, getEventName, isAsynchronous
@Deprecated public EntityShootBowEvent(LivingEntity shooter, ItemStack bow, Projectile projectile, float force)
public EntityShootBowEvent(LivingEntity shooter, ItemStack bow, ItemStack arrowItem, Projectile projectile, float force)
public EntityShootBowEvent(LivingEntity shooter, ItemStack bow, ItemStack arrowItem, Projectile projectile, float force, boolean consumeArrow)
public ItemStack getArrowItem()
public LivingEntity getEntity()
EntityEvent
getEntity
in class EntityEvent
public ItemStack getBow()
public Entity getProjectile()
public void setProjectile(Entity projectile)
projectile
- the new projectilepublic float getForce()
public boolean getConsumeArrow()
public void setConsumeArrow(boolean consumeArrow)
consumeArrow
- state of arrow consumption to setpublic 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 eventpublic HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
Copyright © 2021. All rights reserved.