JSPrismarine
    Preparing search index...

    Permission manager.

    Implements

    Index

    Constructors

    Methods

    • Check if a player can execute a command.

      Parameters

      • Optionalexecuter: Player

        The player to check.

      Returns {
          execute: (permission?: string) => boolean;
          not: () => { execute: (permission?: string) => boolean };
      }

      An object with an execute method that takes a permission string and returns whether the player can execute the command.

    • Set a player as an operator.

      Parameters

      • username: string

        The player to set as an operator.

      • op: boolean

        Whether the player should be an operator.

      Returns Promise<boolean>

      A promise that resolves with a boolean indicating whether the operation was successful.

    Lifecycle