Class YamlStorage

java.lang.Object
net.citizensnpcs.api.util.YamlStorage
All Implemented Interfaces:
FileStorage, Storage

public class YamlStorage extends Object implements FileStorage
  • Constructor Details

    • YamlStorage

      public YamlStorage(File file)
    • YamlStorage

      public YamlStorage(File file, String header)
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getFile

      public File getFile()
      Specified by:
      getFile in interface FileStorage
    • getKey

      public YamlStorage.YamlKey getKey(String root)
      Description copied from interface: Storage
      Returns a DataKey starting from the given root.
      Specified by:
      getKey in interface Storage
      Parameters:
      root - The root to start at
      Returns:
      the created key
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • load

      public boolean load()
      Description copied from interface: Storage
      Loads data from a file or other location.
      Specified by:
      load in interface Storage
      Returns:
      Whether the load was successful
    • save

      public void save()
      Description copied from interface: Storage
      Saves the in-memory aspects of the storage to disk.
      Specified by:
      save in interface Storage
    • toString

      public String toString()
      Overrides:
      toString in class Object