Cancellablepublic class EntityLoadCrossbowEvent extends EntityEvent implements Cancellable
Event.Resultentity| Constructor | Description |
|---|---|
EntityLoadCrossbowEvent(LivingEntity entity,
ItemStack crossbow,
EquipmentSlot hand) |
| Modifier and Type | Method | Description |
|---|---|---|
ItemStack |
getCrossbow() |
Gets the crossbow
ItemStack being loaded. |
LivingEntity |
getEntity() |
Returns the Entity involved in this event
|
EquipmentSlot |
getHand() |
Gets the hand from which the crossbow was loaded.
|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Set whether or not to cancel the crossbow being loaded.
|
getEntityTypecallEvent, getEventName, isAsynchronouspublic EntityLoadCrossbowEvent(@NotNull LivingEntity entity, @Nullable ItemStack crossbow, @NotNull EquipmentSlot hand)
@NotNull public LivingEntity getEntity()
EntityEventgetEntity in class EntityEvent@Nullable public ItemStack getCrossbow()
ItemStack being loaded.@NotNull public EquipmentSlot getHand()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
Player.updateInventory() is made
as the client may think the server still loaded an item into the crossbow.setCancelled 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 © 2021. All rights reserved.