Class Config

java.lang.Object
com.prupe.mcpatcher.Config

@Environment(CLIENT) public class Config extends Object
  • Field Details

  • Constructor Details

    • Config

      public Config()
  • Method Details

    • getInstance

      public static Config getInstance()
    • setReadOnly

      public static void setReadOnly(boolean readOnly)
    • getString

      public static String getString(String mod, String tag, Object defaultValue)
      Gets a value from mcpatcher.json.
      Parameters:
      tag - property name
      defaultValue - default value if not found in profile
      Returns:
      String value
    • getInt

      public static int getInt(String mod, String tag, int defaultValue)
      Gets a value from mcpatcher.json.
      Parameters:
      mod - name of mod
      tag - property name
      defaultValue - default value if not found in profile
      Returns:
      int value or 0
    • getBoolean

      public static boolean getBoolean(String mod, String tag, boolean defaultValue)
      Gets a value from mcpatcher.json.
      Parameters:
      mod - name of mod
      tag - property name
      defaultValue - default value if not found in profile
      Returns:
      boolean value
    • set

      public static void set(String mod, String tag, Object value)
      Sets a value in mcpatcher.json.
      Parameters:
      mod - name of mod
      tag - property name
      value - property value (must support toString())
    • remove

      public static void remove(String mod, String tag)
      Remove a value from mcpatcher.json.
      Parameters:
      mod - name of mod
      tag - property name
    • getOptionsTxt

      public static File getOptionsTxt(File dir, String name)