Class ConfigPuller
java.lang.Object
ActiverseEngine.ConfigPuller
ConfigPuller —
game.* from settings.ini, then bundled Activerse.properties.
Engine keys (fps, show_debug, logging, dynamic lighting) are read only from
Activerse.properties, never from settings.ini.- Version:
- 1.6.0
- Author:
- Knivier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleangetBoolean(String key, boolean defaultValue) Gets a boolean property valuestatic doubleGets a double property valuestatic intGets an integer property valuestatic StringGets a string property valuestatic voidreload()Reloads configuration from diskstatic voidsaveEngineSettings(int fps, boolean showDebug, boolean logging, boolean dynamicLighting) Persists engine toggles from the Settings menu toActiverse.propertieson disk (src/Activerse.propertieswhen asrcdirectory exists in the working directory, otherwiseActiverse.propertiesin the working directory).
-
Constructor Details
-
ConfigPuller
public ConfigPuller()
-
-
Method Details
-
getString
-
getInt
Gets an integer property value- Parameters:
key- Property keydefaultValue- Default value if property not found or invalid- Returns:
- Property value or default
-
getBoolean
Gets a boolean property value- Parameters:
key- Property keydefaultValue- Default value if property not found- Returns:
- Property value or default
-
getDouble
Gets a double property value- Parameters:
key- Property keydefaultValue- Default value if property not found or invalid- Returns:
- Property value or default
-
saveEngineSettings
public static void saveEngineSettings(int fps, boolean showDebug, boolean logging, boolean dynamicLighting) Persists engine toggles from the Settings menu toActiverse.propertieson disk (src/Activerse.propertieswhen asrcdirectory exists in the working directory, otherwiseActiverse.propertiesin the working directory). Does not modifysettings.ini. -
reload
public static void reload()Reloads configuration from disk
-