Class JsonListFile

java.lang.Object
net.glowstone.util.bans.JsonListFile
Direct Known Subclasses:
GlowBanList, UuidListFile

public abstract class JsonListFile extends Object
Tools for storing lists of entries in JSON files.
  • Field Details

  • Constructor Details

    • JsonListFile

      public JsonListFile(File file)
      Initialize the list from the given file.
      Parameters:
      file - The file to use for this list.
  • Method Details

    • load

      public void load()
      Reloads from the file.
    • save

      protected void save()
      Saves to the file.
    • readEntry

      protected abstract JsonListFile.BaseEntry readEntry(Map<String,String> object)
      Deserialize an entry from JSON format.
      Parameters:
      object - The JSON object to read from.
      Returns:
      The finished Entry.