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 OptionStateGet an empty set of options.booleanGet whether this state contains a certain option at all.static @NotNull OptionState.BuilderCreate a builder for an unversioned option state.<V> VGet the value set for a certain option.static @NotNull OptionState.VersionedBuilderCreate a builder for a versioned option state.
-
Method Details
-
emptyOptionState
Get an empty set of options.- Returns:
- the empty option state
- Since:
- 1.0.0
-
optionState
Create a builder for an unversioned option state.- Returns:
- the builder
- Since:
- 1.0.0
-
versionedOptionState
Create a builder for a versioned option state.- Returns:
- the builder
- Since:
- 1.0.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
-