Class YamlConfigFactory

java.lang.Object
com.pixelmonmod.pixelmon.api.config.api.yaml.YamlConfigFactory

public class YamlConfigFactory extends Object
Static factory used for loading the YAML configs from their classes.
  • Constructor Details

    • YamlConfigFactory

      public YamlConfigFactory()
  • Method Details

    • getInstance

      public static <T extends AbstractYamlConfig> T getInstance(Class<T> clazz) throws IOException
      Gets the instance of the given config from the class using Sponge's Configurate
      Type Parameters:
      T - The type of the class
      Parameters:
      clazz - The class that represents a config file
      Returns:
      The config instance
      Throws:
      IOException - If an error occurs whilst loading the file