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.Resulttransaction| Constructor and Description |
|---|
AnvilDamagedEvent(InventoryView inventory,
BlockData blockData) |
| Modifier and Type | Method and Description |
|---|---|
AnvilDamagedEvent.DamageState |
getDamageState()
Gets the new state of damage on the anvil
|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
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(AnvilDamagedEvent.DamageState damageState)
Sets the new state of damage on the anvil
|
getView, getViewerscallEvent, getEventName, isAsynchronouspublic AnvilDamagedEvent(@NotNull
InventoryView inventory,
@NotNull
BlockData blockData)
@NotNull public AnvilInventory getInventory()
InventoryEventgetInventory in class InventoryEvent@NotNull public AnvilDamagedEvent.DamageState getDamageState()
public void setDamageState(@NotNull
AnvilDamagedEvent.DamageState damageState)
damageState - Damage statepublic boolean isBreaking()
public void setBreaking(boolean breaking)
breaking - True if breakingpublic 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 InventoryEvent@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.