Class YamlConfigurationDescriptor

All Implemented Interfaces:
Configuration, ConfigurationSection

public class YamlConfigurationDescriptor extends YamlConfiguration
Bukkit's implementation of YamlConfiguration don't support saving of comments or descriptions. This class is making it possible.
  • Constructor Details

    • YamlConfigurationDescriptor

      public YamlConfigurationDescriptor()
  • Method Details

    • addComment

      public void addComment(String comment)
      Adds a comment to the configuration
      Parameters:
      comment - What the comment shall say
    • addEmptyLine

      public void addEmptyLine()
      Adds an empty line to the configuration
    • addEmptyLine

      public void addEmptyLine(ConfigurationSection section)
      Adds a new empty line at the height of the configuration section.

      Keep in mind that it's not possible to use addEmptyLine() to put an empty line between sections due to technical reasons. Simply use this method to put

      Parameters:
      section - To which section the empty line shall be added to
    • saveToString

      public String saveToString()
      Overrides:
      saveToString in class YamlConfiguration