Interface PermissionDefinition

All Superinterfaces:
CatalogType
All Known Subinterfaces:
FlagDefinition, OptionDefinition

public interface PermissionDefinition extends CatalogType
Represents either a flag or option definition that holds permission data with contexts.
  • 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 the Icon.
      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

      Set<Context> 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

      void setIcon(Icon icon)
      Sets the new Icon
      Parameters:
      id - The new icon