public class AnvilDamagedEvent extends InventoryEvent implements Cancellable
Modifier and Type | Class and Description |
---|---|
static class |
AnvilDamagedEvent.DamageState
Represents the amount of damage on an anvil block
|
Event.Result
transaction
Constructor and Description |
---|
AnvilDamagedEvent(@NotNull InventoryView inventory,
@NotNull BlockData blockData) |
Modifier and Type | Method and Description |
---|---|
@NotNull AnvilDamagedEvent.DamageState |
getDamageState()
Gets the new state of damage on the anvil
|
static @NotNull HandlerList |
getHandlerList() |
@NotNull HandlerList |
getHandlers() |
@NotNull AnvilInventory |
getInventory()
Gets the primary Inventory involved in this transaction
|
boolean |
isBreaking()
Gets if anvil is breaking on this use
|
boolean |
isCancelled()
Gets the cancellation state of this event.
|
void |
setBreaking(boolean breaking)
Sets if anvil is breaking on this use
|
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event.
|
void |
setDamageState(@NotNull AnvilDamagedEvent.DamageState damageState)
Sets the new state of damage on the anvil
|
getView, getViewers
callEvent, getEventName, isAsynchronous
@NotNull public @NotNull AnvilInventory getInventory()
InventoryEvent
getInventory
in class InventoryEvent
@NotNull public @NotNull AnvilDamagedEvent.DamageState getDamageState()
public void setDamageState(@NotNull @NotNull AnvilDamagedEvent.DamageState damageState)
damageState
- Damage statepublic boolean isBreaking()
public void setBreaking(boolean breaking)
breaking
- True if breakingpublic 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 event@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class InventoryEvent
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.