deserializeAndSpawn
fun deserializeAndSpawn(data: ByteArray, location: Location, spawnReason: EntitySpawnReason = EntitySpawnReason.MOB_SUMMONED, disallowedEntityTypes: Set<EntityType> = DEFAULT_DESERIALIZATION_DISALLOWED_ENTITY_TYPES, nbtModifier: (CompoundTag) -> CompoundTag? = null): Entity?
Spawns an BukkitEntity based on serialized data and a location, skipping all entities whose EntityType or their passengers are in the disallowedEntityTypes set.
Parameters
disallowedEntityTypes
A set of EntityTypes that should not be spawned.
nbtModifier
Called before the BukkitEntity gets spawned into the world to allow nbt modifications.
fun deserializeAndSpawn(data: ByteArray, location: Location, spawnReason: EntitySpawnReason = EntitySpawnReason.MOB_SUMMONED, nbtModifier: (CompoundTag) -> CompoundTag? = null): Entity
Deprecated
Use deserializeAndSpawn with disallowedEntityTypes parameter instead.
Replace with
deserializeAndSpawn(data, location, spawnReason, disallowedEntityTypes, nbtModifier)
Content copied to clipboard
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.