Class PermissionComponent

java.lang.Object
io.github.projectunified.minelib.plugin.permission.PermissionComponent
All Implemented Interfaces:
Loadable

public class PermissionComponent extends Object implements Loadable
A component that handles the registration and unregistration of Permission
  • Constructor Details

    • PermissionComponent

      public PermissionComponent(List<org.bukkit.permissions.Permission> permissions)
      Create a new instance
      Parameters:
      permissions - the permissions
    • PermissionComponent

      public PermissionComponent(BasePlugin plugin)
      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
      Specified by:
      enable in interface Loadable
    • disable

      public void disable()
      Description copied from interface: Loadable
      Called when the component is disabled
      Specified by:
      disable in interface Loadable