commonPlayer.setHealth(data.getValue("HealF", (float) commonPlayer.getMaxHealth()));
}
// Respawn position
String spawnWorld = data.getValue("SpawnWorld", "");
IntVector3 spawn = null;
if (!spawnWorld.isEmpty()) {
Integer x = data.getValue("SpawnX", Integer.class);
Integer y = data.getValue("SpawnY", Integer.class);
Integer z = data.getValue("SpawnZ", Integer.class);
if (x != null && y != null && z != null) {
spawn = new IntVector3(x, y, z);
} else {
spawnWorld = ""; //reset, invalid coordinates
}
}
EntityHumanRef.spawnCoord.set(playerHandle, spawn);