1
0
Fork 0

Fixed custom modded inventories not being synced on bukkit side after spawning in world. (fix #75)

kcx-1614
Prototik 2015-06-29 20:31:50 +07:00
parent c2c4cc3c83
commit 50bc729381
1 changed files with 4 additions and 4 deletions

View File

@ -29,16 +29,14 @@ import org.bukkit.plugin.Plugin;
public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
private CraftInventoryPlayer inventory;
private final CraftInventory enderChest;
private CraftInventory enderChest;
protected final PermissibleBase perm = new PermissibleBase(this);
private boolean op;
private GameMode mode;
public CraftHumanEntity(final CraftServer server, final net.minecraft.entity.player.EntityPlayer entity) {
super(server, entity);
mode = server.getDefaultGameMode();
this.inventory = new CraftInventoryPlayer(entity.inventory);
enderChest = new CraftInventory(entity.getInventoryEnderChest());
mode = server.getDefaultGameMode();
}
public String getName() {
@ -46,6 +44,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
public PlayerInventory getInventory() {
if (inventory == null) inventory = new CraftInventoryPlayer(((net.minecraft.entity.player.EntityPlayer) entity).inventory);
return inventory;
}
@ -54,6 +53,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
public Inventory getEnderChest() {
if (enderChest == null) enderChest = new CraftInventory(((net.minecraft.entity.player.EntityPlayer) entity).getInventoryEnderChest());
return enderChest;
}