Cancellablepublic class PlayerLaunchProjectileEvent extends PlayerEvent implements Cancellable
Event.Resultplayer| Constructor | Description |
|---|---|
PlayerLaunchProjectileEvent(Player shooter,
ItemStack itemStack,
Projectile projectile) |
| Modifier and Type | Method | Description |
|---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
ItemStack |
getItemStack() |
Get the ItemStack used to fire the projectile
|
Projectile |
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 |
setShouldConsume(boolean consumeItem) |
Set whether to consume the ItemStack or not
|
boolean |
shouldConsume() |
Get whether to consume the ItemStack or not
|
callEvent, getEventName, isAsynchronousclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPlayer@NotNull public Projectile getProjectile()
@NotNull public ItemStack getItemStack()
public boolean shouldConsume()
public void setShouldConsume(boolean consumeItem)
consumeItem - True to consumepublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - 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.