diff options
author | Lukas Hennig <lukas@wirsindwir.de> | 2016-11-21 15:29:36 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-11-21 15:29:36 +1100 |
commit | 0b154b18523e8809cc54ad6c33b60aed11917a37 (patch) | |
tree | 797ae727d6ccf5cd23c43bb437f9eab3c92b6a0e /nms-patches | |
parent | 7fc4255d1a5ce4017f6fec8326274df592e239da (diff) | |
download | craftbukkit-0b154b18523e8809cc54ad6c33b60aed11917a37.tar craftbukkit-0b154b18523e8809cc54ad6c33b60aed11917a37.tar.gz craftbukkit-0b154b18523e8809cc54ad6c33b60aed11917a37.tar.lz craftbukkit-0b154b18523e8809cc54ad6c33b60aed11917a37.tar.xz craftbukkit-0b154b18523e8809cc54ad6c33b60aed11917a37.zip |
SPIGOT-2272: Add API for virtual Merchants
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 + |