Interface IPermissionAdapter

All Known Implementing Classes:
LuckPermsPermissionAdapter, NullPermissionAdapter

public interface IPermissionAdapter
  • Method Details

    • getPluginName

      String getPluginName()
      Returns the name of the integrated plugin
    • addRequiredBypassPerms

      void addRequiredBypassPerms(UserIdentity identity)
      Removes all groups from the user and adds the required groups
      Parameters:
      identity - the UserIdentity of the user
    • removeRequiredBypassPerms

      void removeRequiredBypassPerms(UserIdentity identity)
      Removes all required groups from the user and adds their original group
      Parameters:
      identity - the UserIdentity of the user
    • hasRequiredBypassPermsSet

      boolean hasRequiredBypassPermsSet(UserIdentity identity)
      Returns whether the user has required groups set currently, i.e. the user does not have their normal groups
      Parameters:
      identity - the UserIdentity of the user
    • findRequiredGroupPerms

      List<String> findRequiredGroupPerms(UserIdentity identity)
      Searches for 'gamersafer.required.<group>' in the users' permissions and extracts '<group>'
      Returns:
      the extracted list of groups
    • addNotAuthedBlockedPerms

      void addNotAuthedBlockedPerms(UserIdentity identity)
      Adds the not-authed groups to the user
      Parameters:
      identity - the UserIdentity of the user
    • removeNotAuthedBlockedPerms

      void removeNotAuthedBlockedPerms(UserIdentity identity)
      Removes the not-authed groups from the user
      Parameters:
      identity - the UserIdentity of the user
    • hasNotAuthedGroupPermission

      boolean hasNotAuthedGroupPermission(String permission)
      Checks whether the not-authed group has the given permission.
      Parameters:
      permission - the permission to check
      Returns:
      true if the group has the passed permission or if the group is not set in the config, false otherwise
    • shutdown

      void shutdown()
      Waits for the background saving task to finish.