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().- Since:
- 0.6.4
-
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.6.4
-
addDefault
Adds a MezzConfig value shown initially.- Parameters:
value- a value registered at a single config screen path- Returns:
- this builder
- Since:
- 0.6.4
-
addDefault
Adds a screen value shown initially.- Parameters:
value- a screen value registered at a single config screen path- Returns:
- this builder
- Since:
- 0.6.4
-
addAdditional
Adds a setting available through Customize, initially hidden.- Parameters:
path- registeredcategory.settingpath- Returns:
- this builder
- Since:
- 0.6.4
-
addAdditional
Adds a MezzConfig value available through Customize, initially hidden.- Parameters:
value- a value registered at a single config screen path- Returns:
- this builder
- Since:
- 0.6.4
-
addAdditional
Adds a screen value available through Customize, initially hidden.- Parameters:
value- a screen value registered at a single config screen path- Returns:
- this builder
- Since:
- 0.6.4
-
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.6.4
-