1
0
forked from xjboss/KCauldronX

Introduced World Save Thread and some refractoring

This commit is contained in:
Prototik
2015-10-14 20:31:35 +07:00
parent a5b10b36ab
commit 98f4f02f55
22 changed files with 424 additions and 349 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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;
}
}