@minecraft/server-admin
    Preparing search index...

    Class AllowListBeta

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

    Index

    Properties

    enabled: boolean

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

    entries: AllowListEntry[]

    The list of entries in the allow list.

    Methods

    • Beta

      Parameters

      • playerDetails: Player | AllowListEntryNameInfo

        Player or player name that should be added to the allow list.

      • OptionalignorePlayerLimit: boolean

        If true, the player will be allowed onto the server even if the server is at its player limit. Defaults to: false

      Returns void

      Adds a player to the server's allow list.

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

      This function can throw errors.

      AllowListModificationError

      minecraftcommon.InvalidArgumentError

      minecraftserver.InvalidEntityError

    • Beta

      Returns void

      Clears the allow list, removing all entries.

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

    • Beta

      Parameters

      Returns boolean

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

      This function can throw errors.

      minecraftcommon.InvalidArgumentError

      minecraftserver.InvalidEntityError

    • Beta

      Returns void

      Reloads the server's allow list from disk.

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

      This function can throw errors.

      AllowListFileReloadError

    • Beta

      Parameters

      • playerDetails: Player | AllowListEntryNameInfo

        Player or player name that should be removed from the allow list.

      Returns void

      Removes a player from the server's allow list.

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

      This function can throw errors.

      AllowListModificationError

      minecraftcommon.InvalidArgumentError

      minecraftserver.InvalidEntityError