use of com.bergerkiller.bukkit.common.BlockLocation in project BKCommonLib by bergerhealer.
the class CommonHumanEntity method getSpawnPoint.
/**
* Gets the block location of the respawn point for the human entity.
* If none is available, null is returned instead.
*
* @return spawn point coordinates, or null if none are available
*/
public BlockLocation getSpawnPoint() {
Object handle = getHandle();
String world = NMSEntityHuman.spawnWorld.get(handle);
IntVector3 coords = NMSEntityHuman.spawnCoord.get(handle);
if (world != null && coords != null && !world.isEmpty()) {
return new BlockLocation(world, coords);
} else {
return null;
}
}
Aggregations