Interface OptionDefinition.Builder
- Enclosing interface:
OptionDefinition
public static interface OptionDefinition.Builder
-
Method Summary
Modifier and TypeMethodDescriptionadmin(boolean value) Whether definition is for admin use only.build()Returns theOptionDefinition.Sets the context.Sets the contexts.defaultValue(String value) Sets the default value.description(net.kyori.adventure.text.Component description) Sets the description.enabled(boolean enabled) Whether this definition is enabled.Sets the definition group.groupDescription(net.kyori.adventure.text.Component description) Sets the group description.Sets theIcon.Sets the definition name.optionData(OptionData data) Sets the option data.ownerMode(boolean value) Whether this definition supports managing owner and trusted.Sets the preset.reset()Resets the builder to default settings.Sets the subject.
-
Method Details
-
enabled
Whether this definition is enabled.- Parameters:
enabled-- Returns:
- The builder
-
admin
Whether definition is for admin use only.- Parameters:
value-- Returns:
- The builder
-
ownerMode
Whether this definition supports managing owner and trusted.
Note: This should only be true if a player can cause the option action(s).- Parameters:
value-- Returns:
- The builder
-
group
Sets the definition group.- Parameters:
group-- Returns:
- The builder
-
preset
Sets the preset.
Note: It is recommended to use modid.
Note: This is where all option definition and group information will be stored.- Parameters:
prest-- Returns:
- The builder
-
defaultValue
Sets the default value.- Parameters:
value- The default value- Returns:
- The builder
-
optionData
Sets the option data.- Parameters:
data- The option data- Returns:
- The builder
-
context
Sets the context.- Parameters:
context- The context- Returns:
- The builder
-
contexts
Sets the contexts.- Parameters:
contexts- The contexts- Returns:
- The builder
-
name
Sets the definition name.- Parameters:
name- The definition name- Returns:
- The builder
-
description
Sets the description.- Parameters:
description- The description- Returns:
- The builder
-
groupDescription
Sets the group description.- Parameters:
description- The group description- Returns:
- The builder
-
subject
Sets the subject.- Parameters:
subject- The subject- Returns:
- The builder
-
icon
Sets theIcon.- Parameters:
icon- The icon- Returns:
- The builder
-
reset
OptionDefinition.Builder reset()Resets the builder to default settings.- Returns:
- The builder
-
build
OptionDefinition build()Returns theOptionDefinition.
Note: The preset, group, and name MUST be a unique combination as it represents the definition id.- Returns:
- The option definition
-