Interface Option<T>
- All Superinterfaces:
CatalogType
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Option.Builder<T> Creates a builder to be used for creating a new.invalid reference
EventContextKeyGets the allowed type for the value of this option.Gets the default value.net.kyori.adventure.text.ComponentGets theComponentdescription for option.Gets the option permission.A set of required context keys that must be set.booleanisGlobal()Whether this option can only apply globally.booleanWhether 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:
trueif the option only applies globally.falseotherwise.
-
multiValued
boolean multiValued()Whether this option can support multiple values.- Returns:
trueif the option supports multiple values.falseotherwise.
-
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 theComponentdescription for option.- Returns:
- The description
-
getDefaultValue
T getDefaultValue()Gets the default value.- Returns:
- The default value
-
getAllowedType
Gets the allowed type for the value of this option.- Returns:
- The allowed type
-
builder
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
-