Interface FlagDefinition.Builder
- Enclosing interface:
FlagDefinition
public static interface FlagDefinition.Builder
-
Method Summary
Modifier and TypeMethodDescriptionadmin(boolean value) Whether definition is for admin use only.build()Returns theFlagDefinition.Sets the context.Sets the contexts.defaultValue(Tristate 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 flag data.Sets the flag data.Sets the definition group.groupDescription(net.kyori.adventure.text.Component description) Sets the group description.Sets theIcon.Sets the definition name.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 flag 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 flag 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
-
flagData
Sets the flag data.- Parameters:
data- The flag data- Returns:
- The builder
-
flagData
Sets the flag data.- Parameters:
data- The flag 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
FlagDefinition.Builder reset()Resets the builder to default settings.- Returns:
- The builder
-
build
FlagDefinition build()Returns theFlagDefinition.
Note: The preset, group, and name MUST be a unique combination as it represents the definition id.- Returns:
- The flag data
-