Class GrindstoneTakeResultEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.inventory.InventoryEvent
org.purpurmc.purpur.event.inventory.GrindstoneTakeResultEvent
Called when a player takes the result item out of a Grindstone
-
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
ConstructorDescriptionGrindstoneTakeResultEvent
(HumanEntity player, InventoryView view, ItemStack result, int experienceAmount) -
Method Summary
Modifier and TypeMethodDescriptionint
Get the amount of experience this transaction will give (takes priority over and uses result fromBlockExpEvent
)static HandlerList
Gets the primary Inventory involved in this transactionvoid
setExperienceAmount
(int experienceAmount) Set the amount of experience this transaction will give (takes priority overBlockExpEvent
)Methods inherited from class org.bukkit.event.inventory.InventoryEvent
getView, getViewers
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
GrindstoneTakeResultEvent
@Internal public GrindstoneTakeResultEvent(HumanEntity player, InventoryView view, ItemStack result, int experienceAmount)
-
-
Method Details
-
getPlayer
-
getResult
-
getInventory
Description copied from class:InventoryEvent
Gets the primary Inventory involved in this transaction- Overrides:
getInventory
in classInventoryEvent
- Returns:
- The upper inventory.
-
getExperienceAmount
public int getExperienceAmount()Get the amount of experience this transaction will give (takes priority over and uses result fromBlockExpEvent
)- Returns:
- Amount of experience to give
-
setExperienceAmount
public void setExperienceAmount(int experienceAmount) Set the amount of experience this transaction will give (takes priority overBlockExpEvent
)- Parameters:
experienceAmount
- Amount of experience to give
-
getHandlers
- Overrides:
getHandlers
in classInventoryEvent
-
getHandlerList
-