Package net.kyori.option
Interface OptionState
- All Known Subinterfaces:
OptionState.Versioned
@NonExtendable
public interface OptionState
Collection of feature flags.
- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder for option states.static interfaceA composite option set.static interfaceA builder for versioned option states. -
Method Summary
Modifier and TypeMethodDescriptionstatic OptionStateDeprecated.booleanGet whether this state contains a certain option at all.static OptionState.BuilderDeprecated.for removal since 1.1.0, create states viaOptionSchema.stateBuilder()insteadschema()Get the option schema defining options that can be set within this state.<V> @Nullable VGet the value set for a certain option.static OptionState.VersionedBuilderDeprecated.for removal since 1.1.0, create states viaOptionSchema.versionedStateBuilder()instead
-
Method Details
-
emptyOptionState
Deprecated.for removal since 1.1.0, access viaOptionSchema.emptyState()insteadGet an empty set of options.- Returns:
- the empty option state
- Since:
- 1.0.0
-
optionState
Deprecated.for removal since 1.1.0, create states viaOptionSchema.stateBuilder()insteadCreate a builder for an unversioned option state.- Returns:
- the builder
- Since:
- 1.0.0
-
versionedOptionState
Deprecated.for removal since 1.1.0, create states viaOptionSchema.versionedStateBuilder()insteadCreate a builder for a versioned option state.- Returns:
- the builder
- Since:
- 1.0.0
-
schema
OptionSchema schema()Get the option schema defining options that can be set within this state.- Returns:
- the option schema
- Since:
- 1.1.0
-
has
Get whether this state contains a certain option at all.- Parameters:
option- the option to check.- Returns:
- whether the option has been touched.
- Since:
- 1.0.0
-
value
Get the value set for a certain option.- Type Parameters:
V- the value type- Parameters:
option- the option to query- Returns:
- the option value
- Since:
- 1.0.0
-
OptionSchema.emptyState()instead