diff options
Diffstat (limited to 'nms-patches')
-rw-r--r-- | nms-patches/InventoryMerchant.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nms-patches/InventoryMerchant.patch b/nms-patches/InventoryMerchant.patch index 58445a12..8c566307 100644 --- a/nms-patches/InventoryMerchant.patch +++ b/nms-patches/InventoryMerchant.patch @@ -43,12 +43,12 @@ + } + + public org.bukkit.inventory.InventoryHolder getOwner() { -+ return (CraftVillager) ((EntityVillager) this.merchant).getBukkitEntity(); ++ return (merchant instanceof EntityVillager) ? (CraftVillager) ((EntityVillager) this.merchant).getBukkitEntity() : null; + } + + @Override + public Location getLocation() { -+ return ((EntityVillager) this.merchant).getBukkitEntity().getLocation(); ++ return (merchant instanceof EntityVillager) ? ((EntityVillager) this.merchant).getBukkitEntity().getLocation() : null; + } + // CraftBukkit end + |