Package com.griefdefender.api.permission
Interface PermissionDefinition
- All Superinterfaces:
CatalogType
- All Known Subinterfaces:
FlagDefinition,OptionDefinition
Represents either a flag or option definition that holds permission data with contexts.
-
Method Summary
Modifier and TypeMethodDescriptionGets the contexts associated with this definition.net.kyori.adventure.text.ComponentGets the description.Gets the friendly description.net.kyori.adventure.text.ComponentGets the group description.Gets the group name associated with this definition.getIcon()Gets theIcon.Gets the preset name associated with this definition.Gets the subject this definition will be applied to.booleanWhether this definition supports managing owner and trusted.booleanisAdmin()Whether this definition is for admin use only.booleanWhether this definition is enabled.voidSets the newIconvoidsetIsEnabled(boolean enabled) Set to enable or disable this definition.Methods inherited from interface com.griefdefender.api.CatalogType
getId, getName
-
Method Details
-
isEnabled
boolean isEnabled()Whether this definition is enabled.- Returns:
- true if enabled
-
isAdmin
boolean isAdmin()Whether this definition is for admin use only.- Returns:
- true if admin only
-
hasOwnerMode
boolean hasOwnerMode()Whether this definition supports managing owner and trusted.
Note: This should only be true if a player can cause the definition action(s).- Returns:
- true if has owner mode
-
getGroupName
String getGroupName()Gets the group name associated with this definition.- Returns:
- The group name
-
getPresetName
String getPresetName()Gets the preset name associated with this definition. -
getFriendlyDescription
String getFriendlyDescription()Gets the friendly description.- Returns:
- The friendly description
-
getIcon
Icon getIcon()Gets theIcon.- Returns:
- The icon
-
getDescription
net.kyori.adventure.text.Component getDescription()Gets the description.- Returns:
- The description
-
getGroupDescription
net.kyori.adventure.text.Component getGroupDescription()Gets the group description.- Returns:
- The group description
-
getContexts
Gets the contexts associated with this definition.- Returns:
- The definition contexts
-
getSubject
Subject getSubject()Gets the subject this definition will be applied to.
Note: If no subject is set,Core.getDefaultSubject()will be used.- Returns:
-
setIsEnabled
void setIsEnabled(boolean enabled) Set to enable or disable this definition.- Parameters:
enabled-
-
setIcon
Sets the newIcon- Parameters:
id- The new icon
-