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>

@Experimental @AvailableSince("1.3") public static final class Preference.Builder<T> extends Object
Builder for constructing preference instances with a fluent API.
Since:
1.3
  • 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

      @AvailableSince("1.3") public Preference<T> build()
      Builds the preference instance.
      Returns:
      the constructed preference