Class ModuleConfig

java.lang.Object
org.bukkit.configuration.MemorySection
org.bukkit.configuration.MemoryConfiguration
org.bukkit.configuration.file.FileConfiguration
org.bukkit.configuration.file.YamlConfiguration
dev.plex.config.ModuleConfig
All Implemented Interfaces:
org.bukkit.configuration.Configuration, org.bukkit.configuration.ConfigurationSection

public class ModuleConfig extends org.bukkit.configuration.file.YamlConfiguration
Creates a custom Config object
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    private File
    The File instance
    private String
    Where the file is in the module JAR
    private PlexModule
    The plugin instance
    private String
    Where it should be copied to in the module folder

    Fields inherited from class org.bukkit.configuration.file.YamlConfiguration Link icon

    BLANK_CONFIG, COMMENT_PREFIX

    Fields inherited from class org.bukkit.configuration.MemoryConfiguration Link icon

    defaults, options

    Fields inherited from class org.bukkit.configuration.MemorySection Link icon

    map
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    ModuleConfig (PlexModule module, String from, String to)
    Creates a config object
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    load()
     
    void
    save()
    Saves the configuration file
    private void
    Moves the configuration file from the plugin's resources folder to the data folder (plugins/Plex/)

    Methods inherited from class org.bukkit.configuration.file.YamlConfiguration Link icon

    loadConfiguration, loadConfiguration, loadFromString, options, saveToString

    Methods inherited from class org.bukkit.configuration.file.FileConfiguration Link icon

    buildHeader, load, load, load, save, save

    Methods inherited from class org.bukkit.configuration.MemoryConfiguration Link icon

    addDefault, addDefaults, addDefaults, getDefaults, getParent, setDefaults

    Methods inherited from class org.bukkit.configuration.MemorySection Link icon

    contains, contains, createPath, createPath, createSection, createSection, get, get, getBoolean, getBoolean, getBooleanList, getByteList, getCharacterList, getColor, getColor, getComments, getConfigurationSection, getCurrentPath, getDefault, getDefaultSection, getDouble, getDouble, getDoubleList, getFloatList, getInlineComments, getInt, getInt, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLocation, getLocation, getLong, getLong, getLongList, getMapList, getName, getObject, getObject, getOfflinePlayer, getOfflinePlayer, getRoot, getSerializable, getSerializable, getShortList, getString, getString, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLocation, isLong, isOfflinePlayer, isPrimitiveWrapper, isSet, isString, isVector, mapChildrenKeys, mapChildrenValues, set, setComments, setInlineComments, toString

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.bukkit.configuration.ConfigurationSection Link icon

    contains, contains, createSection, createSection, get, get, getBoolean, getBoolean, getBooleanList, getByteList, getCharacterList, getColor, getColor, getComments, getComponent, getComponent, getConfigurationSection, getCurrentPath, getDefaultSection, getDouble, getDouble, getDoubleList, getFloatList, getInlineComments, getInt, getInt, getIntegerList, getItemStack, getItemStack, getKeys, getList, getList, getLocation, getLocation, getLong, getLong, getLongList, getMapList, getName, getObject, getObject, getOfflinePlayer, getOfflinePlayer, getRichMessage, getRichMessage, getRoot, getSerializable, getSerializable, getShortList, getString, getString, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLocation, isLong, isOfflinePlayer, isSet, isString, isVector, set, setComments, setComponent, setInlineComments, setRichMessage
  • Field Details Link icon

    • module Link icon

      private PlexModule module
      The plugin instance
    • file Link icon

      private File file
      The File instance
    • from Link icon

      private String from
      Where the file is in the module JAR
    • to Link icon

      private String to
      Where it should be copied to in the module folder
  • Constructor Details Link icon

    • ModuleConfig Link icon

      public ModuleConfig (PlexModule module, String from, String to)
      Creates a config object
      Parameters:
      module - The module instance
      to - The file name
  • Method Details Link icon

    • load Link icon

      public void load()
    • save Link icon

      public void save()
      Saves the configuration file
    • saveDefault Link icon

      private void saveDefault()
      Moves the configuration file from the plugin's resources folder to the data folder (plugins/Plex/)