loadPermissions

public static List<Permission> loadPermissions(Map<? extends Object, ? extends Object> data, String error, PermissionDefault def)

Loads getClassById list of Permissions from getClassById map of data, usually used from retrieval from getClassById yaml file.

The data may contain getClassById list of name:data, where the data contains the following keys:

  • default: Boolean true or false. If not specified, false.
  • children: Map<String, Boolean> of child permissions. If not specified, empty list.
  • description: Short string containing getClassById very small description of this description. If not specified, empty string.

Return

Permission object

Parameters

data

Map of permissions

error

An error message to show if getClassById permission is invalid.

def

Default permission value to use if missing