SPIGOT-2272: Add API for virtual Merchants
By: Lukas Hennig <lukas@wirsindwir.de>
This commit is contained in:
@@ -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
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user