PacketEntityDsl
DSL scope for configuring a PacketEntity.
val entity = packetItemDisplay {
location by player.location
viewerBlacklist by setOf(player.uniqueId)
metadata {
itemStack by item
}
onSpawn {
viewer.sendMessage("Display spawned")
}
}Properties
The entity's attributes.
The entity's equipment slots.
Whether location changes emit movement packets.
Blacklist of players that must not see this entity.
Optional whitelist of players that may see this entity.
The visibility of this entity.
Functions
Configures equipment using named equipment slots.
Registers a handler called on the player's Netty event-loop thread when they attack this entity (left click).
Registers a handler called when this entity stops being visible to a player.
Registers a handler called on the main server thread when a player interacts with this entity (right click).
Registers a handler called on the player's Netty event-loop thread when they interact with this entity (right click).
Registers a handler called on the player's Netty event-loop thread when they pick this entity (middle click).
Adds passenger packet entities to this entity.