Class ConfigPuller

java.lang.Object
ActiverseEngine.ConfigPuller

public class ConfigPuller extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    getBoolean(String key, boolean defaultValue)
    Gets a boolean property value
    static double
    getDouble(String key, double defaultValue)
    Gets a double property value
    static int
    getInt(String key, int defaultValue)
    Gets an integer property value
    static String
    getString(String key, String defaultValue)
    Gets a string property value
    static void
    Reloads configuration from disk
    static void
    saveEngineSettings(int fps, boolean showDebug, boolean logging, boolean dynamicLighting)
    Persists engine toggles from the Settings menu to Activerse.properties on disk (src/Activerse.properties when a src directory exists in the working directory, otherwise Activerse.properties in the working directory).

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConfigPuller

      public ConfigPuller()
  • Method Details

    • getString

      public static String getString(String key, String defaultValue)
      Gets a string property value
      Parameters:
      key - Property key
      defaultValue - Default value if property not found
      Returns:
      Property value or default
    • getInt

      public static int getInt(String key, int defaultValue)
      Gets an integer property value
      Parameters:
      key - Property key
      defaultValue - Default value if property not found or invalid
      Returns:
      Property value or default
    • getBoolean

      public static boolean getBoolean(String key, boolean defaultValue)
      Gets a boolean property value
      Parameters:
      key - Property key
      defaultValue - Default value if property not found
      Returns:
      Property value or default
    • getDouble

      public static double getDouble(String key, double defaultValue)
      Gets a double property value
      Parameters:
      key - Property key
      defaultValue - 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 to Activerse.properties on disk (src/Activerse.properties when a src directory exists in the working directory, otherwise Activerse.properties in the working directory). Does not modify settings.ini.
    • reload

      public static void reload()
      Reloads configuration from disk