A class that manages the permissions of a player.

Note: This only applies when the security mode is set to "Standard Security Mode" and not "Ultra Security Mode".

securityVariables

Constructors

Properties

player: Entity

The player whose permissions are being managed.

Accessors

  • get admin(): boolean

    The player's ability to have operator-level tags.

    True if the player has the admin tag, otherwise false.

    Only applies when Main Menu > Security > Settings > Require admin tag for operator level tags is enabled.

    Returns boolean

    This permission is not recommended for most players, as it will allow them to have tags that can be used to grief the server.

    false
    
  • set admin(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get canBypassProtectedAreas(): boolean

    The player's ability to bypass all forms of spawn protection.

    True if the player has the canBypassProtectedAreas tag, otherwise false.

    Returns boolean

    This permission is not recommended for most players, as it will allow them to have tags that can be used to grief the server.

    false
    
  • set canBypassProtectedAreas(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get canUseChatCommands(): boolean

    The player's ability to use most of the operator-level custom commands in the add-on.

    True if the player has the canUseChatCommands tag, otherwise false.

    Returns boolean

    This permission is not recommended for most players, as it can be used to grief the server.

    false
    
  • set canUseChatCommands(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get canUseCommands(): boolean

    Gets the player's ability to run any vanilla command in the chat with the ${r} or ${run} escape sequence.

    True if the player has the canUseCommands tag, otherwise false.

    Returns boolean

    This permission is not recommended for most players, as it can be used to grief the server.

    false
    
  • set canUseCommands(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get canUseDangerousCommands(): boolean

    The player's ability to use the more dangerous operator-level custom commands in the add-on, such as \chunkban.

    True if the player has the canUseDangerousCommands tag, otherwise false.

    Returns boolean

    This permission is not recommended for most players, as it can be used to grief the server.

    false
    
  • set canUseDangerousCommands(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get canUseScriptEval(): boolean

    Gets the player's ability to run arbitrary JavaScript code in the chat with the ${se} or ${scripteval} escape sequence.

    True if the player has the canUseScriptEval tag, otherwise false.

    Returns boolean

    This permission is not recommended for most players, as it can be used to grief the server.

    false
    
  • set canUseScriptEval(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get getAllChatCommands(): boolean

    The player's ability to see notifications when any player runs any custom command.

    True if the player has the getAllChatCommands tag, otherwise false.

    Returns boolean

    false
    
  • set getAllChatCommands(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get permissionLevel(): number
    Unused

    The player's permission level.

    An integer representing the player's permission level.

    The value is stored in the player's dynamic properties as permissionLevel.

    Returns number

    0
    
  • set permissionLevel(permissionLevel: number): void

    Parameters

    • permissionLevel: number

    Returns void

Methods

  • Disables all permissions for the player.

    Returns void

  • Gets a JSON object representing the player's permissions.

    Returns Pick<
        Globals.PlayerPermissions,
        | "canUseChatCommands"
        | "admin"
        | "canUseDangerousCommands"
        | "permissionLevel"
        | "canUseScriptEval"
        | "canUseCommands"
        | "canBypassProtectedAreas"
        | "getAllChatCommands",
    >

    The player's permissions as a JSON object.