Script API - v1.26.40.20
    Preparing search index...

    Controls the allow list for the server. Only available on dedicated server.

    export class AllowList {
    private constructor();
    enabled: boolean;
    add(player: minecraftserver.Player | string): void;
    clear(): void;
    contains(player: minecraftserver.Player | string): boolean;
    reloadFile(): void;
    remove(player: minecraftserver.Player | string): void;
    }
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    enabled: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    Methods

    • Returns void

      Clears the allow list, removing all entries.

      This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.

    • Parameters

      • player: string | Player

        Player or player name that should be checked for.

      Returns boolean

      Returns if the player is in the server's allow list.

      This function can throw errors.

      minecraftserver.InvalidEntityError

      This function can't be called in early-execution mode.

    • Returns void

      Reloads the server's allow list from disk.

      This function can't be called in restricted-execution mode.

      This function can throw errors.

      AllowListFileReloadError

      This function can't be called in early-execution mode.