Package net.glowstone.util.bans
Class JsonListFile
java.lang.Object
net.glowstone.util.bans.JsonListFile
- Direct Known Subclasses:
GlowBanList
,UuidListFile
Tools for storing lists of entries in JSON files.
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
Base interface for entries in JSON list files. -
Field Summary
Modifier and TypeFieldDescriptionprotected final List<JsonListFile.BaseEntry>
The list as we currently know it. -
Constructor Summary
-
Method Summary
-
Field Details
-
entries
The list as we currently know it.
-
-
Constructor Details
-
JsonListFile
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
Deserialize an entry from JSON format.- Parameters:
object
- The JSON object to read from.- Returns:
- The finished Entry.
-