Saxonberg Server API
    Preparing search index...

    Static API for Player/Avatar management.

    Index

    Constructors

    Methods

    • Type-guard: is this Stuff an Avatar?

      Identity is read off the template path prefix (Avatar.TEMPLATE_PATH_PREFIX === '/obj/Avatar/') rather than instanceof Avatar: a Stuff's template path is its durable identity, in contrast to its backing class (which can change across HMR cycles). The guard narrows to Avatar for callers that go on to use the Avatar-specific surface (getPlayerId(), getUser(), etc.).

      Note: callers who genuinely want TS compile-time typechecking (e.g., "this method requires an Avatar receiver") may still reach for instanceof Avatar — the two have distinct purposes per the inline-comment guidance in the MR review.

      Parameters

      Returns stuff is default

    • Load every Avatar this user owns into the runtime, returning the full set. Reuses any Avatars already registered (multiplexing — a second connection for the same user finds the existing Avatars, doesn't re-clone). Otherwise clones from the user's avatar templates and registers via PostRegistration.

      Threads the user reference and playerId into the clone context so each Avatar's postRegister sees its owning user synchronously.

      Parameters

      Returns Promise<default[]>