mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 19:25:49 -07:00
SPIGOT-5950: Add PrepareSmithingEvent event
This commit is contained in:
@@ -18,6 +18,21 @@
|
||||
|
||||
public ContainerSmithing(int i, PlayerInventory playerinventory) {
|
||||
this(i, playerinventory, ContainerAccess.a);
|
||||
@@ -52,12 +57,12 @@
|
||||
List<RecipeSmithing> list = this.g.getCraftingManager().b(Recipes.SMITHING, this.repairInventory, this.g);
|
||||
|
||||
if (list.isEmpty()) {
|
||||
- this.resultInventory.setItem(0, ItemStack.b);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareSmithingEvent(getBukkitView(), ItemStack.b); // CraftBukkit
|
||||
} else {
|
||||
this.h = (RecipeSmithing) list.get(0);
|
||||
ItemStack itemstack = this.h.a(this.repairInventory);
|
||||
|
||||
- this.resultInventory.setItem(0, itemstack);
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareSmithingEvent(getBukkitView(), itemstack); // CraftBukkit
|
||||
}
|
||||
|
||||
}
|
||||
@@ -68,4 +73,18 @@
|
||||
return recipesmithing.a(itemstack);
|
||||
});
|
||||
|
Reference in New Issue
Block a user