Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

PresenceTrait

const PresenceTrait: CoreTrait<{ entity: Entity | null; visibility: ControlVisibility; }>

The entity that stands for a player in the world, which her nameplate hangs over, or null for none, as in a card game: her character in most games, her dragon in a dragon game. It never moves to what she watches. Set by setPresence as the tick ends, the characters plugin setting her character, and cleared at once when its entity is destroyed. Every page receives it, as null where its visibility is ControlVisibility.Controller, her own page among them, so no nameplate gives a disguised player away. Read it with readTrait(player, PresenceTrait), or go from an entity to its player with findPlayerByPresence.