diff --git a/nms-patches/InventoryMerchant.patch b/nms-patches/InventoryMerchant.patch index 5782fe5d89..07f3854205 100644 --- a/nms-patches/InventoryMerchant.patch +++ b/nms-patches/InventoryMerchant.patch @@ -1,18 +1,19 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/InventoryMerchant.java 2014-11-28 17:43:43.209707433 +0000 -+++ src/main/java/net/minecraft/server/InventoryMerchant.java 2014-11-28 17:38:23.000000000 +0000 -@@ -1,5 +1,11 @@ +--- ../work/decompile-8eb82bde/net/minecraft/server/InventoryMerchant.java 2015-02-06 20:41:38.537609199 +1100 ++++ src/main/java/net/minecraft/server/InventoryMerchant.java 2015-02-06 20:41:38.537609199 +1100 +@@ -1,5 +1,12 @@ package net.minecraft.server; +// CraftBukkit start +import java.util.List; +import org.bukkit.craftbukkit.entity.CraftHumanEntity; ++import org.bukkit.craftbukkit.entity.CraftVillager; +import org.bukkit.entity.HumanEntity; +// CraftBukkit end + public class InventoryMerchant implements IInventory { private final IMerchant merchant; -@@ -8,6 +14,35 @@ +@@ -8,6 +15,35 @@ private MerchantRecipe recipe; private int e; @@ -41,14 +42,14 @@ + } + + public org.bukkit.inventory.InventoryHolder getOwner() { -+ return player.getBukkitEntity(); ++ return (CraftVillager) ((EntityVillager) this.merchant).getBukkitEntity(); + } + // CraftBukkit end + public InventoryMerchant(EntityHuman entityhuman, IMerchant imerchant) { this.player = entityhuman; this.merchant = imerchant; -@@ -94,7 +129,7 @@ +@@ -94,7 +130,7 @@ } public int getMaxStackSize() {