Interface Option<T>

All Superinterfaces:
CatalogType

public interface Option<T> extends CatalogType
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Option.Builder<T>
    builder(Class<T> clazz)
    Creates a builder to be used for creating a new
    invalid reference
    EventContextKey
    .
    Gets the allowed type for the value of this option.
    Gets the default value.
    net.kyori.adventure.text.Component
    Gets the Component description for option.
    Gets the option permission.
    A set of required context keys that must be set.
    boolean
    Whether this option can only apply globally.
    boolean
    Whether this option can support multiple values.

    Methods inherited from interface com.griefdefender.api.CatalogType

    getId, getName
  • Method Details

    • isGlobal

      boolean isGlobal()
      Whether this option can only apply globally.
      Returns:
      true if the option only applies globally. false otherwise.
    • multiValued

      boolean multiValued()
      Whether this option can support multiple values.
      Returns:
      true if the option supports multiple values. false otherwise.
    • getRequiredContextKeys

      Set<String> getRequiredContextKeys()
      A set of required context keys that must be set.
      Returns:
      An immutable set of required context keys
    • getPermission

      String getPermission()
      Gets the option permission.
      Returns:
      The permission
    • getDescription

      net.kyori.adventure.text.Component getDescription()
      Gets the Component description for option.
      Returns:
      The description
    • getDefaultValue

      T getDefaultValue()
      Gets the default value.
      Returns:
      The default value
    • getAllowedType

      Class<T> getAllowedType()
      Gets the allowed type for the value of this option.
      Returns:
      The allowed type
    • builder

      static <T> Option.Builder<T> builder(Class<T> clazz)
      Creates a builder to be used for creating a new
      invalid reference
      EventContextKey
      .
      Type Parameters:
      T - The type of the value stored with this key
      Parameters:
      clazz - The class the key will allow access to
      Returns:
      The constructed builder