Package org.galliumpowered.permission
Class Group
java.lang.Object
org.galliumpowered.permission.Group
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPermission(String permission) Adds a permission to the groupgetName()The name of the groupThe permissions the group holdsPrefix of the groupbooleanhasPermission(String permission) Whether the group has a specific permissionvoidremovePermission(String permission) Removes a permission from the groupvoidSets the group's prefix.
-
Constructor Details
-
Group
-
-
Method Details
-
getName
The name of the group- Returns:
- Group name
-
getPermissions
The permissions the group holds- Returns:
- Permisisons of the group
-
getPrefix
Prefix of the group- Returns:
- Group prefix
-
addPermission
Adds a permission to the group- Parameters:
permission- The permission to add- Throws:
SQLException
-
removePermission
Removes a permission from the group- Parameters:
permission- The permission to remove- Throws:
SQLException
-
hasPermission
Whether the group has a specific permission- Parameters:
permission- The permission to check- Returns:
- True if the permission is present, otherwise false
-
setPrefix
Sets the group's prefix. Supports colour coding with &- Parameters:
prefix- The prefix to set it to
-