Interface IPermissionsManager

All Known Subinterfaces:
IPermissionsManagerSpigot
All Known Implementing Classes:
VaultManager

public interface IPermissionsManager
  • Method Details

    • getMaxPermissionSuffix

      OptionalInt getMaxPermissionSuffix(IPlayer player, String permissionBase)
      Gets the highest numerical permission suffix of the base permission node it can find, if any.

      For example, if a player has "permission.node.1" and "permission.node.2", this method would return (the OptionalInt of) 2.

      Parameters:
      player - The player whose permissions to check.
      permissionBase - The base permission. In the example above, this would be "permission.node." (note the '.' at the end).
      Returns:
      The highest numerical suffix of the base permission node if it exists, otherwise an empty OptionalInt.
    • hasPermission

      boolean hasPermission(IPlayer player, String permissionNode)
      Checks if a player has a certain permission node or not.
      Parameters:
      player - The player whose permissions to check.
      permissionNode - The permission node to check.
      Returns:
      True if the player has the permission node.
    • hasBypassPermissionsForAttribute

      boolean hasBypassPermissionsForAttribute(IPlayer player, StructureAttribute structureAttribute)
      Checks if a player has bypass permissions for a specific attribute.

      Having bypass permissions means that a player is able to access a given attribute for structures even if they are not co-owners of those structures.

      Parameters:
      player - The player whose permissions to check.
      structureAttribute - The attribute of the Structure for which to verify if the player has bypass permissions.
      Returns:
      True if the player has bypass permissions for the attribute.
    • isOp

      boolean isOp(IPlayer player)
      Checks if the given player is a server operator or not.
      Parameters:
      player - The player to check.
      Returns:
      True if the player is a server operator on this server.
    • hasPermissionToCreateStructure

      boolean hasPermissionToCreateStructure(ICommandSender sender, StructureType type)
      Checks if the given command sender has permission to create a structure of the given type.
      Parameters:
      sender - The command sender to check.
      type - The type of structure to check.
      Returns:
      True if the sender has permission to create a structure of the given type.