Class Option<T>

java.lang.Object
journeymap.api.v2.client.option.Option<T>
Direct Known Subclasses:
BooleanOption, CustomOption, EnumOption, FloatOption, IntegerOption

public abstract class Option<T> extends Object
  • Field Details

    • defaultValue

      protected final T defaultValue
    • config

      protected Config<T> config
  • Constructor Details

    • Option

      protected Option(OptionCategory category, String fieldName, String label, T defaultValue)
      Parent for all options. For tooltips, your i18n key plus .tooltip in your language json example mod.option.label and mod.option.label.tooltip
      Parameters:
      category - - The category.
      fieldName - - The field name.
      label - - the label, can be the display string or i18n key.
      defaultValue - - the default value.
  • Method Details

    • getCategory

      public OptionCategory getCategory()
    • getFieldName

      public String getFieldName()
    • getLabel

      public String getLabel()
    • get

      public T get()
    • set

      public void set(T value)
    • getDefaultValue

      public T getDefaultValue()
    • getSortOrder

      public int getSortOrder()
    • setSortOrder

      public Option<T> setSortOrder(int sortOrder)
      Used for sorting in the options pane.
      Parameters:
      sortOrder - the sort order.