Class ConfigUtil

java.lang.Object
org.leralix.lib.utils.config.ConfigUtil

public class ConfigUtil extends Object
This class is used for config related utilities.
  • Method Details

    • getCustomConfig

      public static org.bukkit.configuration.file.FileConfiguration getCustomConfig(ConfigTag tag)
      Get a custom config by its name.
      Parameters:
      tag - The tag of the config file.
      Returns:
      The FileConfiguration object.
    • addCustomConfig

      public static void addCustomConfig(org.bukkit.plugin.Plugin plugin, String fileName, ConfigTag tag)
      Load a custom config file into the memory
      Parameters:
      fileName - The name of the file to load
    • saveAndUpdateResource

      public static void saveAndUpdateResource(org.bukkit.plugin.Plugin plugin, String fileName)
    • saveAndUpdateResource

      public static void saveAndUpdateResource(org.bukkit.plugin.Plugin plugin, String fileName, Collection<String> sectionBlacklist)
      Save and update a resource file. If some lines are missing in the current file, they will be added at the correct position.
      Parameters:
      fileName - The name of the resource file.