summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-01-17 01:55:18 +0100
committerErik Broes <erikbroes@grum.nl>2011-01-17 01:55:18 +0100
commit0c492912de65dcf725007bea115968311cd79dd9 (patch)
tree14f6aa395ff9524cd94198846f7ef83a55da339a /src
parent74d746b6c5d9cfeb50cbc62144a84fdcd164058e (diff)
downloadcraftbukkit-0c492912de65dcf725007bea115968311cd79dd9.tar
craftbukkit-0c492912de65dcf725007bea115968311cd79dd9.tar.gz
craftbukkit-0c492912de65dcf725007bea115968311cd79dd9.tar.lz
craftbukkit-0c492912de65dcf725007bea115968311cd79dd9.tar.xz
craftbukkit-0c492912de65dcf725007bea115968311cd79dd9.zip
Updated CraftHumanEntity to refresh the inventory on death, should fix odd behavior around that.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 38b9f575..e0c669e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -6,6 +6,7 @@ import org.bukkit.entity.HumanEntity;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
import org.bukkit.craftbukkit.CraftServer;
public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@@ -30,13 +31,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
public void setHandle(final EntityPlayer entity) {
super.setHandle((EntityPlayer)entity);
this.entity = entity;
+ this.inventory = new CraftInventoryPlayer( entity.an );
}
- public PlayerInventory getInventory() {
+ public CraftInventoryPlayer getInventory() {
return inventory;
}
- public ItemStack getItemInHand() {
+ public CraftItemStack getItemInHand() {
return getInventory().getItemInHand();
}