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

    Class AsyncPlayerJoinBeforeEventBeta

    The data available before a player joins the world.

    Index

    Properties

    name: string

    The player's name

    persistentId: string

    An identifier that can be used to identify a player across sessions.

    Methods

    • Beta

      Returns void

      Call this to explicitly allow the player to join the server. This is useful when player joining is disabled (allow-player-joining is set to false when playing on dedicated server).

      This function can throw errors.

      DisconnectedError

    • Beta

      Parameters

      • Optionalreason: string

      Returns void

      Deprecated - use disallowJoin instead.Call this to disconnect a player. They will be allowed to try to join again.

      This function can throw errors.

      DisconnectedError

    • Beta

      Parameters

      • Optionalreason: string

      Returns void

      Call this to stop the player from joining the server. They will be allowed to try to join again.

      This function can throw errors.

      DisconnectedError

    • Beta

      Returns boolean

      Will return true if the player is still waiting to join the world. If they disconnect then it will return false.