forked from xjboss/KCauldronX
Introduced World Save Thread and some refractoring
This commit is contained in:
@ -416,7 +416,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
// Spigot start
|
||||
net.minecraft.world.WorldServer newWorld = ((CraftWorld) location.getWorld()).getHandle();
|
||||
if (newWorld != entity.worldObj) {
|
||||
entity.teleportTo(location, cause.isPortal());
|
||||
entity.teleportTo(location, cause.isPortal());
|
||||
return true;
|
||||
}
|
||||
// Spigot
|
||||
|
@ -44,7 +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);
|
||||
if (inventory == null) inventory = new CraftInventoryPlayer(((net.minecraft.entity.player.EntityPlayer) entity).inventory);
|
||||
return inventory;
|
||||
}
|
||||
|
||||
@ -53,7 +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());
|
||||
if (enderChest == null) enderChest = new CraftInventory(((net.minecraft.entity.player.EntityPlayer) entity).getInventoryEnderChest());
|
||||
return enderChest;
|
||||
}
|
||||
|
||||
|
@ -82,8 +82,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
firstPlayed = System.currentTimeMillis();
|
||||
double maxHealth = entity.getEntityAttribute(SharedMonsterAttributes.maxHealth).getBaseValue();
|
||||
if (maxHealth != health) {
|
||||
healthScale = maxHealth;
|
||||
scaledHealth = true;
|
||||
healthScale = maxHealth;
|
||||
scaledHealth = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user