Class Config

java.lang.Object
com.plotsquared.core.configuration.Config
Direct Known Subclasses:
Settings, Storage

public class Config extends Object
  • Constructor Details

  • Method Details

    • set

      public static void set(String key, Object value, Class<? extends Config> root)
      Set the value of a specific node
      Probably throws some error if you supply non existing keys or invalid values
      Parameters:
      key - config node
      value - value
      root - configuration class
    • load

      public static boolean load(File file, Class<? extends Config> root)
    • save

      public static void save(File file, Class<? extends Config> root)
      Set all values in the file (load first to avoid overwriting)
      Parameters:
      file - file
      root - configuration file class
    • getFields

      Get the static fields in a section.
      Parameters:
      clazz - config section
      Returns:
      map or string against object of static fields