Class PermissionComponent
java.lang.Object
io.github.projectunified.minelib.plugin.permission.PermissionComponent
- All Implemented Interfaces:
Loadable
A component that handles the registration and unregistration of
Permission
-
Constructor Summary
ConstructorDescriptionPermissionComponent
(BasePlugin plugin) Create a new instance that automatically discovers the permissionsPermissionComponent
(List<org.bukkit.permissions.Permission> permissions) Create a new instance -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPermission
(org.bukkit.permissions.Permission permission) Add a permissionvoid
disable()
Called when the component is disabledvoid
enable()
Called when the component is enabledvoid
removePermission
(org.bukkit.permissions.Permission permission) Remove a permission
-
Constructor Details
-
PermissionComponent
Create a new instance- Parameters:
permissions
- the permissions
-
PermissionComponent
Create a new instance that automatically discovers the permissions- Parameters:
plugin
- the plugin
-
-
Method Details
-
addPermission
public void addPermission(org.bukkit.permissions.Permission permission) Add a permission- Parameters:
permission
- the permission
-
removePermission
public void removePermission(org.bukkit.permissions.Permission permission) Remove a permission- Parameters:
permission
- the permission
-
enable
public void enable()Description copied from interface:Loadable
Called when the component is enabled -
disable
public void disable()Description copied from interface:Loadable
Called when the component is disabled
-