public class EntityShootBowEvent extends EntityEvent implements Cancellable
Event.Resultentity| Constructor and Description |
|---|
EntityShootBowEvent(@NotNull LivingEntity shooter,
@Nullable ItemStack bow,
@NotNull Entity projectile,
float force)
Deprecated.
|
EntityShootBowEvent(@NotNull LivingEntity shooter,
@Nullable ItemStack bow,
@NotNull ItemStack arrowItem,
@NotNull Entity projectile,
float force) |
| Modifier and Type | Method and Description |
|---|---|
@NotNull ItemStack |
getArrowItem() |
@Nullable ItemStack |
getBow()
Gets the bow ItemStack used to fire the arrow.
|
boolean |
getConsumeArrow() |
@NotNull LivingEntity |
getEntity()
Returns the Entity involved in this event
|
float |
getForce()
Gets the force the arrow was launched with
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@NotNull 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(@NotNull Entity projectile)
Replaces the projectile which will be launched
|
getEntityTypecallEvent, getEventName, isAsynchronous@Deprecated public EntityShootBowEvent(@NotNull @NotNull LivingEntity shooter, @Nullable @Nullable ItemStack bow, @NotNull @NotNull Entity projectile, float force)
public EntityShootBowEvent(@NotNull
@NotNull LivingEntity shooter,
@Nullable
@Nullable ItemStack bow,
@NotNull
@NotNull ItemStack arrowItem,
@NotNull
@NotNull Entity projectile,
float force)
public void setConsumeArrow(boolean consumeArrow)
public boolean getConsumeArrow()
@NotNull public @NotNull ItemStack getArrowItem()
@NotNull public @NotNull LivingEntity getEntity()
EntityEventgetEntity in class EntityEvent@Nullable public @Nullable ItemStack getBow()
@NotNull public @NotNull Entity getProjectile()
public void setProjectile(@NotNull
@NotNull Entity projectile)
projectile - the new projectilepublic float getForce()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled 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.