public class BlockShearEntityEvent extends BlockEvent implements Cancellable
Event.Result
block
Constructor and Description |
---|
BlockShearEntityEvent(Block dispenser,
Entity sheared,
ItemStack tool) |
Modifier and Type | Method and Description |
---|---|
Entity |
getEntity()
Gets the entity that was sheared.
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
ItemStack |
getTool()
Gets the item used to shear this sheep.
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancelled)
Sets the cancellation state of this event.
|
getBlock
callEvent, getEventName, isAsynchronous
@NotNull public Entity getEntity()
@NotNull public ItemStack getTool()
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancelled)
Cancellable
setCancelled
in interface Cancellable
cancelled
- true if you wish to cancel this event@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
Copyright © 2022. All rights reserved.