Class NBTStorage

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

public class NBTStorage extends Object implements FileStorage
  • Constructor Details

    • NBTStorage

      public NBTStorage(File file)
    • NBTStorage

      public NBTStorage(File file, String name)
    • NBTStorage

      public NBTStorage(String file)
  • Method Details

    • getFile

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

      public NBTStorage.NBTKey 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
    • 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