Fix crash with 1.20 smithing table

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2023-03-15 18:43:20 +11:00
parent 28c4b7531f
commit aa22d67aa3

View file

@ -1484,7 +1484,7 @@ public class CraftEventFactory {
public static PrepareSmithingEvent callPrepareSmithingEvent(InventoryView view, ItemStack item) {
PrepareSmithingEvent event = new PrepareSmithingEvent(view, CraftItemStack.asCraftMirror(item).clone());
event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
event.getInventory().setItem(2, event.getResult());
event.getInventory().setResult(event.getResult());
return event;
}