Cancellable
public class AnvilDamagedEvent extends InventoryEvent implements Cancellable
Modifier and Type | Class | Description |
---|---|---|
static class |
AnvilDamagedEvent.DamageState |
Represents the amount of damage on an anvil block
|
Event.Result
transaction
Constructor | Description |
---|---|
AnvilDamagedEvent(InventoryView inventory,
BlockData blockData) |
Modifier and Type | Method | 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
|
callEvent, getEventName, isAsynchronous
getView, getViewers
public AnvilDamagedEvent(@NotNull InventoryView inventory, @NotNull BlockData blockData)
@NotNull public AnvilInventory getInventory()
InventoryEvent
getInventory
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()
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 HandlerList getHandlers()
getHandlers
in class InventoryEvent
@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.