diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-16 18:32:01 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-16 18:32:01 -0500 |
commit | 6f68fc4ba4aeff5091b6fa9bd5df70c573a2ce53 (patch) | |
tree | bd63b2e3651b0935fe9d554161235c0893ee113e /src | |
parent | 737e8c512759169a0ca83e04c47fe7c06012457b (diff) | |
download | craftbukkit-6f68fc4ba4aeff5091b6fa9bd5df70c573a2ce53.tar craftbukkit-6f68fc4ba4aeff5091b6fa9bd5df70c573a2ce53.tar.gz craftbukkit-6f68fc4ba4aeff5091b6fa9bd5df70c573a2ce53.tar.lz craftbukkit-6f68fc4ba4aeff5091b6fa9bd5df70c573a2ce53.tar.xz craftbukkit-6f68fc4ba4aeff5091b6fa9bd5df70c573a2ce53.zip |
Add missing getOwner method for container minecarts.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityMinecartContainer.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/src/main/java/net/minecraft/server/EntityMinecartContainer.java index e7398f8d..b6d324c6 100644 --- a/src/main/java/net/minecraft/server/EntityMinecartContainer.java +++ b/src/main/java/net/minecraft/server/EntityMinecartContainer.java @@ -5,6 +5,7 @@ import java.util.List; import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.entity.HumanEntity; +import org.bukkit.inventory.InventoryHolder; // CraftBukkit end public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements IInventory { @@ -32,6 +33,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp return transaction; } + public InventoryHolder getOwner() { + org.bukkit.entity.Entity cart = getBukkitEntity(); + if(cart instanceof InventoryHolder) return (InventoryHolder) cart; + return null; + } + public void setMaxStackSize(int size) { maxStack = size; } |