Class BetterYaml

java.lang.Object
be.dezijwegel.betteryaml.BetterYaml
All Implemented Interfaces:
IConfigReader

public class BetterYaml
extends Object
implements IConfigReader
A class aimed at internal use only. It is recommended to use OptionalBetterYaml However, when you want to handle Exceptions yourself, feel free to use this class
  • Constructor Summary

    Constructors
    Constructor Description
    BetterYaml​(String name, ValidationHandler validationHandler, org.bukkit.plugin.java.JavaPlugin plugin, boolean doLogging)
    Deprecated.
    We advise using OptionalBetterYaml, this causes less clutter in your code.
    BetterYaml​(String template, String defaultValues, String defaultValuesPath, ValidationHandler validationHandler, org.bukkit.plugin.java.JavaPlugin plugin, boolean doLogging)
    Deprecated.
    We advise against using this constructor as it is meant for internal use only.
    BetterYaml​(String template, String defaultValues, String defaultValuesPath, org.bukkit.plugin.java.JavaPlugin plugin, boolean doLogging)
    Deprecated.
    We advise against using this constructor as it is meant for internal use only.
    BetterYaml​(String name, org.bukkit.plugin.java.JavaPlugin plugin)
    Deprecated.
    We advise using OptionalBetterYaml, this causes less clutter in your code.
    BetterYaml​(String name, org.bukkit.plugin.java.JavaPlugin plugin, boolean doLogging)
    Deprecated.
    We advise using OptionalBetterYaml, this causes less clutter in your code.
  • Method Summary

    Modifier and Type Method Description
    File getFile()  
    org.bukkit.configuration.file.YamlConfiguration getYamlConfiguration()  

    Methods inherited from class java.lang.Object

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

    • BetterYaml

      @Deprecated public BetterYaml​(String name, org.bukkit.plugin.java.JavaPlugin plugin) throws IOException
      Deprecated.
      We advise using OptionalBetterYaml, this causes less clutter in your code. However, this class will not be removed in future versions as some people may want to handle exceptions themselves.
      Creates a BetterYaml instance that will handle your config files For the server's file: Missing options will be autocompleted and comments will be updated based on the template No settings will be changed Will not log any messages to the console
      Parameters:
      name - the name of the config file eg. "ourConfig.yml"
      plugin - the JavaPlugin for which a file is copied
      Throws:
      IOException - when your configuration is incorrect
    • BetterYaml

      @Deprecated public BetterYaml​(String name, org.bukkit.plugin.java.JavaPlugin plugin, boolean doLogging) throws IOException
      Deprecated.
      We advise using OptionalBetterYaml, this causes less clutter in your code. However, this class will not be removed in future versions as some people may want to handle exceptions themselves.
      Creates a BetterYaml instance that will handle your config files For the server's file: Missing options will be autocompleted and comments will be updated based on the template No settings will be changed
      Parameters:
      name - the name of the config file eg. "ourConfig.yml"
      plugin - the JavaPlugin for which a file is copied
      doLogging - whether or not basic logging is done in your plugin's name. (Only logs on copying a new file and when missing options are found)
      Throws:
      IOException - when your configuration is incorrect
    • BetterYaml

      @Deprecated public BetterYaml​(String name, ValidationHandler validationHandler, org.bukkit.plugin.java.JavaPlugin plugin, boolean doLogging) throws IOException
      Deprecated.
      We advise using OptionalBetterYaml, this causes less clutter in your code. However, this class will not be removed in future versions as some people may want to handle exceptions themselves.
      Creates a BetterYaml instance that will handle your config files For the server's file: Missing options will be autocompleted and comments will be updated based on the template No settings will be changed
      Parameters:
      name - the name of the config file eg. "ourConfig.yml"
      plugin - the JavaPlugin for which a file is copied
      doLogging - whether or not basic logging is done in your plugin's name. (Only logs on copying a new file and when missing options are found)
      Throws:
      IOException - when your configuration is incorrect
    • BetterYaml

      @Deprecated public BetterYaml​(String template, String defaultValues, String defaultValuesPath, org.bukkit.plugin.java.JavaPlugin plugin, boolean doLogging) throws IOException
      Deprecated.
      We advise against using this constructor as it is meant for internal use only. This constructor enables you to alter the desired path structure, so only use it when you know what you are doing!
      Creates a BetterYaml instance that will handle your config files For the server's file: Missing options will be autocompleted and comments will be updated based on the template No settings will be changed
      Parameters:
      template - the name of the template/live config file eg. "ourConfig.yml"
      defaultValues - the name of the config file that contains the default values
      defaultValuesPath - the path to the default resource (ending on a /)
      plugin - the JavaPlugin for which a file is copied
      doLogging - whether or not basic logging is done in your plugin's name. (Only logs on copying a new file and when missing options are found)
      Throws:
      IOException - when your configuration is incorrect
    • BetterYaml

      @Deprecated public BetterYaml​(String template, String defaultValues, String defaultValuesPath, ValidationHandler validationHandler, org.bukkit.plugin.java.JavaPlugin plugin, boolean doLogging) throws IOException
      Deprecated.
      We advise against using this constructor as it is meant for internal use only. This constructor enables you to alter the desired path structure, so only use it when you know what you are doing!
      Creates a BetterYaml instance that will handle your config files For the server's file: Missing options will be autocompleted and comments will be updated based on the template No settings will be changed
      Parameters:
      template - the name of the template/live config file eg. "ourConfig.yml"
      defaultValues - the name of the config file that contains the default values
      defaultValuesPath - the path to the default resource (ending on a /)
      validationHandler - the validator that can autocorrect options, based on your provided settings
      plugin - the JavaPlugin for which a file is copied
      doLogging - whether or not basic logging is done in your plugin's name. (Only logs on copying a new file and when missing options are found)
      Throws:
      IOException - when your configuration is incorrect
  • Method Details