Package org.bukkit.event.inventory
Class PrepareAnvilEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- org.bukkit.event.inventory.InventoryEvent
-
- org.bukkit.event.inventory.PrepareAnvilEvent
-
public class PrepareAnvilEvent extends InventoryEvent
Called when an item is put in a slot for repair by an anvil.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
-
Field Summary
-
Fields inherited from class org.bukkit.event.inventory.InventoryEvent
transaction
-
-
Constructor Summary
Constructors Constructor Description PrepareAnvilEvent(InventoryView inventory, ItemStack result)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HandlerList
getHandlerList()
HandlerList
getHandlers()
AnvilInventory
getInventory()
Gets the primary Inventory involved in this transactionItemStack
getResult()
Get result item, may be null.void
setResult(ItemStack result)
-
Methods inherited from class org.bukkit.event.inventory.InventoryEvent
getView, getViewers
-
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
-
-
-
Constructor Detail
-
PrepareAnvilEvent
public PrepareAnvilEvent(@NotNull InventoryView inventory, @Nullable ItemStack result)
-
-
Method Detail
-
getInventory
@NotNull public AnvilInventory getInventory()
Description copied from class:InventoryEvent
Gets the primary Inventory involved in this transaction- Overrides:
getInventory
in classInventoryEvent
- Returns:
- The upper inventory.
-
getResult
@Nullable public ItemStack getResult()
Get result item, may be null.- Returns:
- result item
-
setResult
public void setResult(@Nullable ItemStack result)
-
getHandlers
@NotNull public HandlerList getHandlers()
- Overrides:
getHandlers
in classInventoryEvent
-
getHandlerList
@NotNull public static HandlerList getHandlerList()
-
-