Interface IPermissionsManager
- All Known Subinterfaces:
IPermissionsManagerSpigot
- All Known Implementing Classes:
VaultManager
public interface IPermissionsManager
-
Method Summary
Modifier and TypeMethodDescriptiongetMaxPermissionSuffix(IPlayer player, String permissionBase) Gets the highest numerical permission suffix of the base permission node it can find, if any.booleanhasBypassPermissionsForAttribute(IPlayer player, StructureAttribute structureAttribute) Checks if a player has bypass permissions for a specific attribute.booleanhasPermission(IPlayer player, String permissionNode) Checks if a player has a certain permission node or not.booleanhasPermissionToCreateStructure(ICommandSender sender, StructureType type) Checks if the given command sender has permission to create a structure of the given type.booleanChecks if the given player is a server operator or not.
-
Method Details
-
getMaxPermissionSuffix
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
-
hasBypassPermissionsForAttribute
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
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
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.
-