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 Summary
Modifier and TypeMethodDescriptionaddAdditional(String path) Adds a setting available through Customize, initially hidden.addAdditional(net.mezzdev.config.api.value.IConfigValue<?> value) Adds a MezzConfig value available through Customize, initially hidden.addAdditional(IConfigScreenValue<?> value) Adds a screen value available through Customize, initially hidden.addDefault(String path) Adds a setting shown initially.addDefault(net.mezzdev.config.api.value.IConfigValue<?> value) Adds a MezzConfig value shown initially.addDefault(IConfigScreenValue<?> value) Adds a screen value shown initially.build()Creates the menu from the configured settings.
-
Method Details
-
addDefault
Adds a setting shown initially.- Parameters:
path- registeredcategory.settingpath- Returns:
- this builder
- Since:
- 0.8.0
-
addDefault
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
Adds a setting available through Customize, initially hidden.- Parameters:
path- registeredcategory.settingpath- Returns:
- this builder
- Since:
- 0.8.0
-
addAdditional
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
IQuickConfigMenu 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-ownedIllegalStateException- if this mod has no registered config screen- Since:
- 0.8.0
-