mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Updated CraftHumanEntity to refresh the inventory on death, should fix odd behavior around that.
By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
parent
bbc2093115
commit
11d156e65e
@ -6,6 +6,7 @@ import org.bukkit.entity.HumanEntity;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.inventory.PlayerInventory;
|
import org.bukkit.inventory.PlayerInventory;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
|
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
|
||||||
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
|
|
||||||
public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
||||||
@ -30,13 +31,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|||||||
public void setHandle(final EntityPlayer entity) {
|
public void setHandle(final EntityPlayer entity) {
|
||||||
super.setHandle((EntityPlayer)entity);
|
super.setHandle((EntityPlayer)entity);
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
|
this.inventory = new CraftInventoryPlayer( entity.an );
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlayerInventory getInventory() {
|
public CraftInventoryPlayer getInventory() {
|
||||||
return inventory;
|
return inventory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getItemInHand() {
|
public CraftItemStack getItemInHand() {
|
||||||
return getInventory().getItemInHand();
|
return getInventory().getItemInHand();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user