Package org.bukkit.event.inventory

# Class PrepareAnvilEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
com.destroystokyo.paper.event.inventory.PrepareResultEvent
org.bukkit.event.inventory.PrepareAnvilEvent

public class PrepareAnvilEvent extends PrepareResultEvent
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(@NotNull InventoryView inventory, @Nullable ItemStack result)`

## Method Summary

Modifier and Type
Method
Description
`@NotNull AnvilInventory`
`getInventory()`
Gets the primary Inventory involved in this transaction
`@Nullable ItemStack`
`getResult()`
Get result item, may be null.
`void`
`setResult(@Nullable ItemStack result)`

### Methods inherited from class com.destroystokyo.paper.event.inventory.PrepareResultEvent

`getHandlerList, getHandlers`

### Methods inherited from class org.bukkit.event.inventory.InventoryEvent

`getView, getViewers`

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PrepareAnvilEvent

public PrepareAnvilEvent(@NotNull @NotNull InventoryView inventory, @Nullable @Nullable ItemStack result)

## Method Details

### getInventory

@NotNull public @NotNull AnvilInventory getInventory()
Description copied from class: `InventoryEvent`
Gets the primary Inventory involved in this transaction

Overrides:
  `getInventory` in class `InventoryEvent`
Returns:
  The upper inventory.

### getResult

@Nullable public @Nullable ItemStack getResult()
Get result item, may be null.

Overrides:
  `getResult` in class `PrepareResultEvent`
Returns:
  result item

### setResult

public void setResult(@Nullable @Nullable ItemStack result)

Overrides:
  `setResult` in class `PrepareResultEvent`