EntityUtils

Functions

Link copied to clipboard
fun createBlockDropItemEntities(pos: BlockPos, items: Iterable<ItemStack>): List<ItemEntity>

Creates not-spawned item entities based on the specified items and pos.

Link copied to clipboard
fun createFakePlayer(location: Location, uuid: UUID = UUID.randomUUID(), name: String = "Nova FakePlayer", hasEvents: Boolean = false): ServerPlayer

Creates a fake ServerPlayer object.

Link copied to clipboard
fun deserializeAndSpawn(data: ByteArray, location: Location, nbtModifier: (CompoundTag) -> CompoundTag? = null): Entity

Spawns an BukkitEntity based on serialized data and a location.

Link copied to clipboard
fun getAllPassengers(entity: Entity): List<Entity>

Gets a list of all passengers of this BukkitEntity, including passengers of passengers.

Link copied to clipboard
fun serialize(entity: Entity, remove: Boolean = false, nbtModifier: (CompoundTag) -> CompoundTag? = null): ByteArray

Serializes an BukkitEntity to a ByteArray.