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 the player’s nameplate hangs over, or null for none, as in a card game: the character in most games, the dragon in a dragon game. It never moves to what the player watches. Set by setPresence as the tick ends, the characters plugin setting the player’s character, and cleared at once when its entity is destroyed. Every page receives it, as null where its visibility is ControlVisibility.Controller, the player’s 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.