Class Preference.Builder<T>
java.lang.Object
dev.mintychochip.mint.preferences.Preference.Builder<T>
- Type Parameters:
T- the preference value type
- Enclosing interface:
Preference<T>
Builder for constructing preference instances with a fluent API.
- Since:
- 1.3
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the preference instance.description(net.kyori.adventure.text.Component description) Sets the description for this preference.displayName(net.kyori.adventure.text.Component displayName) Sets the display displayName for this preference.
-
Method Details
-
displayName
@AvailableSince("1.3") public Preference.Builder<T> displayName(net.kyori.adventure.text.Component displayName) Sets the display displayName for this preference.- Parameters:
displayName- the display displayName component- Returns:
- this builder
-
description
@AvailableSince("1.3") public Preference.Builder<T> description(net.kyori.adventure.text.Component description) Sets the description for this preference.- Parameters:
description- the description component- Returns:
- this builder
-
build
Builds the preference instance.- Returns:
- the constructed preference
-