Class CommentedFileConfigurationHelper

java.lang.Object
dev.esophose.playerparticles.config.CommentedFileConfigurationHelper

public class CommentedFileConfigurationHelper
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    CommentedFileConfigurationHelper​(org.bukkit.plugin.java.JavaPlugin plugin)
    Manage custom configurations and files
  • Method Summary

    Modifier and Type Method Description
    java.io.Reader getConfigContent​(java.io.File file)
    Read file and make comments SnakeYAML friendly
    CommentedFileConfiguration getNewConfig​(java.io.File file)
    Get new configuration
    java.lang.String getPluginName()  
    void saveConfig​(java.lang.String configString, java.io.File file, boolean compactLines)
    Saves configuration to file

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CommentedFileConfigurationHelper

      public CommentedFileConfigurationHelper​(org.bukkit.plugin.java.JavaPlugin plugin)
      Manage custom configurations and files
      Parameters:
      plugin - The JavaPlugin the configuration is for
  • Method Details

    • getNewConfig

      public CommentedFileConfiguration getNewConfig​(java.io.File file)
      Get new configuration
      Parameters:
      file - - Path to file
      Returns:
      - New SimpleConfig
    • getConfigContent

      public java.io.Reader getConfigContent​(java.io.File file)
      Read file and make comments SnakeYAML friendly
      Parameters:
      file - - Path to file
      Returns:
      - File as Input Stream
    • saveConfig

      public void saveConfig​(java.lang.String configString, java.io.File file, boolean compactLines)
      Saves configuration to file
      Parameters:
      configString - - Config string
      file - - Config file
      compactLines - - If lines should forcefully be separated by only one newline character
    • getPluginName

      public java.lang.String getPluginName()