summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorfeildmaster <admin@feildmaster.com>2012-08-20 15:52:44 -0500
committerfeildmaster <admin@feildmaster.com>2012-08-20 16:00:53 -0500
commite7e643d83a137107727d2120e51a2ee3ad571d1a (patch)
tree19845948e6716cee495be3edadd5d05eb88f55cc /src/main
parentfeb0327d22feb285e47e7666d1d02da1b06dd289 (diff)
downloadcraftbukkit-e7e643d83a137107727d2120e51a2ee3ad571d1a.tar
craftbukkit-e7e643d83a137107727d2120e51a2ee3ad571d1a.tar.gz
craftbukkit-e7e643d83a137107727d2120e51a2ee3ad571d1a.tar.lz
craftbukkit-e7e643d83a137107727d2120e51a2ee3ad571d1a.tar.xz
craftbukkit-e7e643d83a137107727d2120e51a2ee3ad571d1a.zip
Implement API to retrieve and open EnderChests. Adds BUKKIT-2016
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 67ad8a83..9f055920 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -36,6 +36,7 @@ import org.bukkit.plugin.Plugin;
public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
private CraftInventoryPlayer inventory;
+ private CraftInventory enderChest;
protected final PermissibleBase perm = new PermissibleBase(this);
private boolean op;
private GameMode mode;
@@ -44,6 +45,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
super(server, entity);
mode = server.getDefaultGameMode();
this.inventory = new CraftInventoryPlayer(entity.inventory);
+ enderChest = new CraftInventory(entity.getEnderChest());
}
public String getName() {
@@ -54,6 +56,10 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
return inventory;
}
+ public Inventory getEnderChest() {
+ return enderChest;
+ }
+
public ItemStack getItemInHand() {
return getInventory().getItemInHand();
}
@@ -176,6 +182,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
switch(type) {
case PLAYER:
case CHEST:
+ case ENDER_CHEST:
getHandle().openContainer(craftinv.getInventory());
break;
case DISPENSER: