Package com.prupe.mcpatcher
Class Config
java.lang.Object
com.prupe.mcpatcher.Config
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetBoolean(String mod, String tag, boolean defaultValue) Gets a value from mcpatcher.json.static Configstatic intGets a value from mcpatcher.json.static FilegetOptionsTxt(File dir, String name) static StringGets a value from mcpatcher.json.static voidRemove a value from mcpatcher.json.static voidSets a value in mcpatcher.json.static voidsetReadOnly(boolean readOnly)
-
Field Details
-
MCPATCHER_PROPERTIES
- See Also:
-
MCPATCHER_JSON
- See Also:
-
LAUNCHER_JSON
- See Also:
-
VERSIONS_JSON
- See Also:
-
MCPATCHER_PROFILE_NAME
- See Also:
-
-
Constructor Details
-
Config
public Config()
-
-
Method Details
-
getInstance
-
setReadOnly
public static void setReadOnly(boolean readOnly) -
getString
Gets a value from mcpatcher.json.- Parameters:
tag- property namedefaultValue- default value if not found in profile- Returns:
- String value
-
getInt
Gets a value from mcpatcher.json.- Parameters:
mod- name of modtag- property namedefaultValue- default value if not found in profile- Returns:
- int value or 0
-
getBoolean
Gets a value from mcpatcher.json.- Parameters:
mod- name of modtag- property namedefaultValue- default value if not found in profile- Returns:
- boolean value
-
set
Sets a value in mcpatcher.json.- Parameters:
mod- name of modtag- property namevalue- property value (must support toString())
-
remove
Remove a value from mcpatcher.json.- Parameters:
mod- name of modtag- property name
-
getOptionsTxt
-