Class BlockInfoConfig

java.lang.Object
me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config
me.mrCookieSlime.Slimefun.api.BlockInfoConfig

public class BlockInfoConfig extends Config
This class is used to speed up parsing of a JsonObject that is stored at a given Location. This simply utilises a HashMap to cache the data and then provides the same getters as a normal Config.
Author:
creator3
See Also:
  • Constructor Details

    • BlockInfoConfig

      public BlockInfoConfig()
    • BlockInfoConfig

      public BlockInfoConfig(Map<String,String> data)
  • Method Details

    • getMap

      @Nonnull public Map<String,String> getMap()
    • setValue

      public void setValue(String path, Object value)
      Description copied from class: Config
      Sets the Value for the specified Path
      Overrides:
      setValue in class Config
      Parameters:
      path - The path in the Config File
      value - The Value for that Path
    • contains

      public boolean contains(String path)
      Description copied from class: Config
      Checks whether the Config contains the specified Path
      Overrides:
      contains in class Config
      Parameters:
      path - The path in the Config File
      Returns:
      True/false
    • getValue

      public Object getValue(String path)
      Description copied from class: Config
      Returns the Object at the specified Path
      Overrides:
      getValue in class Config
      Parameters:
      path - The path in the Config File
      Returns:
      The Value at that Path
    • getString

      public String getString(String path)
      Description copied from class: Config
      Returns the String at the specified Path
      Overrides:
      getString in class Config
      Parameters:
      path - The path in the Config File
      Returns:
      The String at that Path
    • getKeys

      public Set<String> getKeys()
      Description copied from class: Config
      Returns all Paths in this Config
      Overrides:
      getKeys in class Config
      Returns:
      All Paths in this Config
    • getKeys

      public Set<String> getKeys(String path)
      Description copied from class: Config
      Returns all Sub-Paths in this Config
      Overrides:
      getKeys in class Config
      Parameters:
      path - The path in the Config File
      Returns:
      All Sub-Paths of the specified Path
    • getFile

      public File getFile()
      Description copied from class: Config
      Returns the File the Config is handling
      Overrides:
      getFile in class Config
      Returns:
      The File this Config is handling
    • getConfiguration

      public FileConfiguration getConfiguration()
      Description copied from class: Config
      Converts this Config Object into a plain FileConfiguration Object
      Overrides:
      getConfiguration in class Config
      Returns:
      The converted FileConfiguration Object
    • save

      public void save()
      Description copied from class: Config
      Saves the Config Object to its File
      Overrides:
      save in class Config
    • save

      public void save(File file)
      Description copied from class: Config
      Saves the Config Object to a File
      Overrides:
      save in class Config
      Parameters:
      file - The File you are saving this Config to
    • createFile

      public void createFile()
      Description copied from class: Config
      Recreates the File of this Config
      Overrides:
      createFile in class Config
    • reload

      public void reload()
      Description copied from class: Config
      Reloads the Configuration File
      Overrides:
      reload in class Config
    • toJSON

      @Nonnull public String toJSON()