Class DataLoader

java.lang.Object
emu.grasscutter.data.DataLoader

public class DataLoader extends Object
  • Constructor Details

    • DataLoader

      public DataLoader()
  • Method Details

    • load

      public static InputStream load(String resourcePath) throws FileNotFoundException
      Load a data file by its name. If the file isn't found within the /data directory then it will fallback to the default within the jar resources
      Parameters:
      resourcePath - The path to the data file to be loaded.
      Returns:
      InputStream of the data file.
      Throws:
      FileNotFoundException
      See Also:
    • load

      public static InputStream load(String resourcePath, boolean useFallback) throws FileNotFoundException
      Load a data file by its name.
      Parameters:
      resourcePath - The path to the data file to be loaded.
      useFallback - If the file does not exist in the /data directory, should it use the default file in the jar?
      Returns:
      InputStream of the data file.
      Throws:
      FileNotFoundException
    • CheckAllFiles

      public static void CheckAllFiles()