Class AnvilDamagedEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
com.destroystokyo.paper.event.block.AnvilDamagedEvent
- All Implemented Interfaces:
- Cancellable
Called when an anvil is damaged from being used
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumRepresents the amount of damage on an anvil blockNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.inventory.InventoryEventtransaction
- 
Constructor SummaryConstructorsConstructorDescriptionAnvilDamagedEvent(@NotNull InventoryView inventory, @NotNull BlockData blockData) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the new state of damage on the anvilstatic @NotNull HandlerListGets the primary Inventory involved in this transactionbooleanGets if anvil is breaking on this usebooleanGets the cancellation state of this event.voidsetBreaking(boolean breaking) Sets if anvil is breaking on this usevoidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetDamageState(@NotNull AnvilDamagedEvent.DamageState damageState) Sets the new state of damage on the anvilMethods inherited from class org.bukkit.event.inventory.InventoryEventgetView, getViewersMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
AnvilDamagedEvent
 
- 
- 
Method Details- 
getInventoryDescription copied from class:InventoryEventGets the primary Inventory involved in this transaction- Overrides:
- getInventoryin class- InventoryEvent
- Returns:
- The upper inventory.
 
- 
getDamageStateGets the new state of damage on the anvil- Returns:
- Damage state
 
- 
setDamageStateSets the new state of damage on the anvil- Parameters:
- damageState- Damage state
 
- 
isBreakingpublic boolean isBreaking()Gets if anvil is breaking on this use- Returns:
- True if breaking
 
- 
setBreakingpublic void setBreaking(boolean breaking) Sets if anvil is breaking on this use- Parameters:
- breaking- True if breaking
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers- Overrides:
- getHandlersin class- InventoryEvent
 
- 
getHandlerList
 
-