Interface IQuickConfigMenuBuilder


@NonExtendable public interface IQuickConfigMenuBuilder
Defines a quick menu's default and additional settings in insertion order. Paths, MezzConfig values, and screen values can be mixed in either group. Screen values match registered entries by IConfigScreenValue.getIdentityKey(). When a value appears more than once, its first entry in screen order supplies the editor and persistent path.
Since:
0.8.0
  • Method Details

    • addDefault

      IQuickConfigMenuBuilder addDefault(String path)
      Adds a setting shown initially.
      Parameters:
      path - registered category.setting path
      Returns:
      this builder
      Since:
      0.8.0
    • addDefault

      IQuickConfigMenuBuilder addDefault(net.mezzdev.config.api.value.IConfigValue<?> value)
      Adds a MezzConfig value shown initially.
      Parameters:
      value - a value registered on the config screen
      Returns:
      this builder
      Since:
      0.8.0
    • addDefault

      Adds a screen value shown initially.
      Parameters:
      value - a registered screen value
      Returns:
      this builder
      Since:
      0.8.0
    • addAdditional

      IQuickConfigMenuBuilder addAdditional(String path)
      Adds a setting available through Customize, initially hidden.
      Parameters:
      path - registered category.setting path
      Returns:
      this builder
      Since:
      0.8.0
    • addAdditional

      IQuickConfigMenuBuilder addAdditional(net.mezzdev.config.api.value.IConfigValue<?> value)
      Adds a MezzConfig value available through Customize, initially hidden.
      Parameters:
      value - a value registered on the config screen
      Returns:
      this builder
      Since:
      0.8.0
    • addAdditional

      Adds a screen value available through Customize, initially hidden.
      Parameters:
      value - a registered screen value
      Returns:
      this builder
      Since:
      0.8.0
    • build

      Creates the menu from the configured settings. Call on the client thread after plugin registration has finished.
      Returns:
      a closed menu
      Throws:
      IllegalArgumentException - if a setting is unknown, ambiguous, duplicated, or server-owned
      IllegalStateException - if this mod has no registered config screen
      Since:
      0.8.0