mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-23 16:23:50 -07:00
SPIGOT-6078: Add SmithItemEvent and expand SmithingInventory API
By: Julian van den Berkmortel <julianvdberkmortel@outlook.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package org.bukkit.event.inventory;
|
||||
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.inventory.SmithingInventory;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Called when the recipe of an Item is completed inside a smithing table.
|
||||
*/
|
||||
public class SmithItemEvent extends InventoryClickEvent {
|
||||
|
||||
public SmithItemEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action) {
|
||||
super(view, type, slot, click, action);
|
||||
}
|
||||
|
||||
public SmithItemEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action, int key) {
|
||||
super(view, type, slot, click, action, key);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public SmithingInventory getInventory() {
|
||||
return (SmithingInventory) super.getInventory();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user