Class DataFile

java.lang.Object
studio.magemonkey.codex.mccore.config.DataFile

public class DataFile extends Object
Handles saving/loading data in a more condensed JSON format with UTF-8 support in order to save disk space compared to regular YAML configurations.
  • Constructor Details

    • DataFile

      public DataFile(org.bukkit.plugin.java.JavaPlugin plugin, String name)
      Constructor
      Parameters:
      plugin - plugin reference
      name - file name
  • Method Details

    • getPlugin

      public org.bukkit.plugin.java.JavaPlugin getPlugin()
      Returns:
      plugin owning this config file
    • getFileName

      public String getFileName()
      Returns:
      name of the file this config saves to
    • clear

      public void clear()

      Clears all of the data in the config

      This doesn't save the config so if you want the changes to be reflected in the actual file, call the save() method after doing this.

    • reload

      public void reload()
      Reloads the config data
    • getData

      public DataSection getData()
      Returns:
      config file
    • getFile

      public File getFile()

      Retrieves the file of the configuration

      Returns:
      the file of the configuration
    • save

      public void save()
      Saves the config