java.lang.Object
org.bukkit.configuration.MemorySection
org.bukkit.configuration.MemoryConfiguration
org.bukkit.configuration.file.FileConfiguration
org.bukkit.configuration.file.YamlConfiguration
studio.magemonkey.codex.config.api.JYML
All Implemented Interfaces:
org.bukkit.configuration.Configuration, org.bukkit.configuration.ConfigurationSection

public class JYML extends org.bukkit.configuration.file.YamlConfiguration
  • Field Summary

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

    BLANK_CONFIG, COMMENT_PREFIX

    Fields inherited from class org.bukkit.configuration.MemoryConfiguration

    defaults, options

    Fields inherited from class org.bukkit.configuration.MemorySection

    map
  • Constructor Summary

    Constructors
    Constructor
    Description
    JYML(File file)
     
    JYML(String path, String file)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addMissing(String path, Object val)
     
     
     
    <T extends Enum<T>>
    GuiItem
    getGuiItem(String path, Class<T> clazzEnum)
     
    int[]
     
    org.bukkit.inventory.ItemStack
     
    org.bukkit.inventory.ItemStack
    getItem(String path, boolean id)
     
    org.bukkit.Location
     
     
     
    getString(String path, String def)
     
     
    static List<JYML>
    loadAll(String path, boolean deep)
     
    static JYML
    loadOrExtract(CodexPlugin<?> plugin, String filePath)
     
    boolean
     
    boolean
    remove(String path)
     
    void
     
    boolean
     
    void
    set(String path, Object o)
     
    void
    setIntArray(String path, int[] arr)
     
    void
    setItem(String path, org.bukkit.inventory.ItemStack item)
     
    void
    setLocation(String path, org.bukkit.Location loc)
    Deprecated.

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

    loadConfiguration, loadConfiguration, loadFromString, options, saveToString

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

    buildHeader, load, load, load, save, save

    Methods inherited from class org.bukkit.configuration.MemoryConfiguration

    addDefault, addDefaults, addDefaults, getDefaults, getParent, setDefaults

    Methods inherited from class org.bukkit.configuration.MemorySection

    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, getLong, getLong, getLongList, getMapList, getName, getObject, getObject, getOfflinePlayer, getOfflinePlayer, getRoot, getSerializable, getSerializable, getShortList, getStringList, getValues, getVector, getVector, isBoolean, isColor, isConfigurationSection, isDouble, isInt, isItemStack, isList, isLocation, isLong, isOfflinePlayer, isPrimitiveWrapper, isSet, isString, isVector, mapChildrenKeys, mapChildrenValues, setComments, setInlineComments, toString

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface org.bukkit.configuration.ConfigurationSection

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

    • JYML

      public JYML(@NotNull String path, @NotNull String file) throws org.bukkit.configuration.InvalidConfigurationException
      Throws:
      org.bukkit.configuration.InvalidConfigurationException
    • JYML

      public JYML(@NotNull File file) throws org.bukkit.configuration.InvalidConfigurationException
      Throws:
      org.bukkit.configuration.InvalidConfigurationException
  • Method Details

    • getFile

      @NotNull public File getFile()
    • save

      public void save()
    • saveChanges

      public boolean saveChanges()
    • reload

      public boolean reload() throws org.bukkit.configuration.InvalidConfigurationException
      Throws:
      org.bukkit.configuration.InvalidConfigurationException
    • loadOrExtract

      @NotNull public static JYML loadOrExtract(@NotNull CodexPlugin<?> plugin, @NotNull String filePath) throws org.bukkit.configuration.InvalidConfigurationException
      Throws:
      org.bukkit.configuration.InvalidConfigurationException
    • loadAll

      @NotNull public static List<JYML> loadAll(@NotNull String path, boolean deep)
    • addMissing

      public boolean addMissing(@NotNull String path, @Nullable Object val)
    • set

      public void set(@NotNull String path, @Nullable Object o)
      Specified by:
      set in interface org.bukkit.configuration.ConfigurationSection
      Overrides:
      set in class org.bukkit.configuration.MemorySection
    • remove

      public boolean remove(@NotNull String path)
    • getSection

      @NotNull public Set<String> getSection(@NotNull String path)
    • getString

      @Nullable public String getString(@NotNull String path)
      Specified by:
      getString in interface org.bukkit.configuration.ConfigurationSection
      Overrides:
      getString in class org.bukkit.configuration.MemorySection
    • getString

      @NotNull public String getString(String path, @Nullable String def)
      Specified by:
      getString in interface org.bukkit.configuration.ConfigurationSection
      Overrides:
      getString in class org.bukkit.configuration.MemorySection
    • getStringSet

      @NotNull public Set<String> getStringSet(@NotNull String path)
    • getLocation

      @Nullable public org.bukkit.Location getLocation(String path)
      Specified by:
      getLocation in interface org.bukkit.configuration.ConfigurationSection
      Overrides:
      getLocation in class org.bukkit.configuration.MemorySection
    • setLocation

      @Deprecated public void setLocation(@NotNull String path, @Nullable org.bukkit.Location loc)
      Deprecated.
    • getIntArray

      public int[] getIntArray(@NotNull String path)
    • setIntArray

      public void setIntArray(@NotNull String path, int[] arr)
    • getItem

      @NotNull public org.bukkit.inventory.ItemStack getItem(@NotNull String path)
    • getItem

      @NotNull public org.bukkit.inventory.ItemStack getItem(@NotNull String path, boolean id)
    • getGuiItem

      @Nullable public GuiItem getGuiItem(@NotNull String path)
    • getGuiItem

      @Nullable public <T extends Enum<T>> GuiItem getGuiItem(@NotNull String path, @Nullable Class<T> clazzEnum)
    • setItem

      public void setItem(@NotNull String path, @Nullable org.bukkit.inventory.ItemStack item)