Commits

Julian v.d Berkmortel authored and md_5 committed 14883d6b17f
SPIGOT-6078: Add SmithItemEvent and expand SmithingInventory API
No tags

src/main/java/org/bukkit/event/inventory/SmithItemEvent.java

Added
1 +package org.bukkit.event.inventory;
2 +
3 +import org.bukkit.inventory.InventoryView;
4 +import org.bukkit.inventory.SmithingInventory;
5 +import org.jetbrains.annotations.NotNull;
6 +
7 +/**
8 + * Called when the recipe of an Item is completed inside a smithing table.
9 + */
10 +public class SmithItemEvent extends InventoryClickEvent {
11 +
12 + public SmithItemEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action) {
13 + super(view, type, slot, click, action);
14 + }
15 +
16 + public SmithItemEvent(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action, int key) {
17 + super(view, type, slot, click, action, key);
18 + }
19 +
20 + @NotNull
21 + @Override
22 + public SmithingInventory getInventory() {
23 + return (SmithingInventory) super.getInventory();
24 + }
25 +}

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut