Package me.hackware.api.setting
Class Setting<T>
java.lang.Object
me.hackware.api.setting.Setting<T>
- Direct Known Subclasses:
ActionSetting,BooleanSetting,ChoiceSetting,ColorSetting,FilterSetting,KeybindSetting,ListSetting,MapSetting,MultiSelectSetting,NumberSetting,StringSetting
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondefaultValue(T defaultValue) description(String description) displayName(String displayName) get()getGroup()getName()getOwner()static booleanTrue while the config layer is bulk-applying values from disk.booleanisModal()Whether the GUI opens this setting's picker / dropdown / list in a popup instead of inline.booleanvoidPuts this setting back the way a fresh install has it.static voidsetBulkLoadProbe(BooleanSupplier probe) Installed once by the config layer; the API ships a never-loading default.voidsetModal(boolean modal) voidsetOwner(SettingContainer owner) voidvisible(boolean visible) visible(BooleanSupplier visible)
-
Field Details
-
value
-
-
Constructor Details
-
Setting
-
Setting
-
Setting
-
Setting
-
-
Method Details
-
setBulkLoadProbe
Installed once by the config layer; the API ships a never-loading default. -
isBulkLoading
public static boolean isBulkLoading()True while the config layer is bulk-applying values from disk. -
displayName
-
description
-
group
-
defaultValue
-
visible
-
visible
-
onChanged
-
getName
-
getDisplayName
-
getDescription
-
getGroup
-
getDefaultValue
-
get
-
isVisible
public boolean isVisible() -
isModal
public boolean isModal()Whether the GUI opens this setting's picker / dropdown / list in a popup instead of inline. SeeModalSetting. -
setModal
public void setModal(boolean modal) -
setValue
-
resetToDefault
public void resetToDefault()Puts this setting back the way a fresh install has it. Saves and firesonChangedlike any other change. A setting that keeps state beyond its value (a color's on/off and rainbow, a bind's mode, a group's children) extends this. -
getOwner
-
setOwner
-