deserializeAndSpawn

fun deserializeAndSpawn(data: ByteArray, location: Location, spawnReason: EntitySpawnReason = EntitySpawnReason.MOB_SUMMONED, nbtModifier: (CompoundTag) -> CompoundTag? = null): Entity

Spawns an BukkitEntity based on serialized data and a location.

Parameters

nbtModifier

Called before the BukkitEntity gets spawned into the world to allow nbt modifications.