diff options
author | Wesley Wolfe <weswolf@aol.com> | 2013-07-25 18:04:09 -0500 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-07-25 18:04:09 -0500 |
commit | 5bfd599e9fa2ec8daa92e5c3df04a4b2fb63c282 (patch) | |
tree | cfedc4a82e9939cace8262eaf3b16b0650c8a566 /src/main/java/net/minecraft/server/InventoryHorseChest.java | |
parent | 0a9758ae548c03938be2e3e41cdd6f0fc1db8183 (diff) | |
download | craftbukkit-5bfd599e9fa2ec8daa92e5c3df04a4b2fb63c282.tar craftbukkit-5bfd599e9fa2ec8daa92e5c3df04a4b2fb63c282.tar.gz craftbukkit-5bfd599e9fa2ec8daa92e5c3df04a4b2fb63c282.tar.lz craftbukkit-5bfd599e9fa2ec8daa92e5c3df04a4b2fb63c282.tar.xz craftbukkit-5bfd599e9fa2ec8daa92e5c3df04a4b2fb63c282.zip |
Store owning Horse in horse inventory. Fixes BUKKIT-4586
Diffstat (limited to 'src/main/java/net/minecraft/server/InventoryHorseChest.java')
-rw-r--r-- | src/main/java/net/minecraft/server/InventoryHorseChest.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/InventoryHorseChest.java b/src/main/java/net/minecraft/server/InventoryHorseChest.java index 1fa3d5f4..d3a5ebe4 100644 --- a/src/main/java/net/minecraft/server/InventoryHorseChest.java +++ b/src/main/java/net/minecraft/server/InventoryHorseChest.java @@ -14,9 +14,14 @@ public class InventoryHorseChest extends InventorySubcontainer { // CraftBukkit start public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>(); - public org.bukkit.entity.Player player; + private EntityHorse horse; private int maxStack = MAX_STACK; + public InventoryHorseChest(String s, int i, EntityHorse horse) { + this(s, i); + this.horse = horse; + } + @Override public ItemStack[] getContents() { return this.items; @@ -39,7 +44,7 @@ public class InventoryHorseChest extends InventorySubcontainer { @Override public org.bukkit.inventory.InventoryHolder getOwner() { - return this.player; + return (org.bukkit.entity.Horse) this.horse.getBukkitEntity(); } @Override |