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.ReadergetConfigContent(java.io.File file)Read file and make comments SnakeYAML friendlyCommentedFileConfigurationgetNewConfig(java.io.File file)Get new configurationjava.lang.StringgetPluginName()voidsaveConfig(java.lang.String configString, java.io.File file, boolean compactLines)Saves configuration to file
-
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
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 stringfile- - Config filecompactLines- - If lines should forcefully be separated by only one newline character
-
getPluginName
public java.lang.String getPluginName()
-