Saxonberg Server API
    Preparing search index...
    interface Contacts {
        addContact(entry: ContactEntry): boolean;
        allContacts(): readonly ContactEntry[];
        clearContactLabel(label: string): number;
        contactLabels(): string[];
        contactsByLabel(label: string): readonly ContactEntry[];
        removeContact(kind: "avatar" | "npc", ref: string, label: string): boolean;
        renameContactLabel(oldLabel: string, newLabel: string): number;
    }
    Index

    Methods

    • Remove a contact entry by ref+label. Returns true if anything was removed. For avatar entries, ref = playerId; for npc entries, ref = templatePath.

      Parameters

      • kind: "avatar" | "npc"
      • ref: string
      • label: string

      Returns boolean

    • Rename every entry of oldLabel to newLabel. Returns count relabeled. No-op if no entries have oldLabel.

      Parameters

      • oldLabel: string
      • newLabel: string

      Returns number