Class JSONFactions
- java.lang.Object
-
- com.massivecraft.factions.Factions
-
- com.massivecraft.factions.zcore.persist.MemoryFactions
-
- com.massivecraft.factions.zcore.persist.json.JSONFactions
-
public class JSONFactions extends MemoryFactions
-
-
Field Summary
-
Fields inherited from class com.massivecraft.factions.zcore.persist.MemoryFactions
factions, nextId
-
-
Constructor Summary
Constructors Constructor Description JSONFactions()
-
Method Summary
Modifier and Type Method Description void
convertFrom(MemoryFactions old)
void
forceSave()
void
forceSave(boolean sync)
Faction
generateFactionObject()
Faction
generateFactionObject(java.lang.String id)
java.io.File
getFile()
com.google.gson.Gson
getGson()
java.lang.String
getNextId()
boolean
isIdFree(int id)
boolean
isIdFree(java.lang.String id)
void
load()
protected void
updateNextIdForId(int id)
protected void
updateNextIdForId(java.lang.String id)
-
Methods inherited from class com.massivecraft.factions.zcore.persist.MemoryFactions
createFaction, getAllFactions, getBestTagMatch, getByTag, getFactionById, getFactionTags, getNone, getSafeZone, getWarZone, getWilderness, isTagTaken, isValidFactionId, removeFaction
-
Methods inherited from class com.massivecraft.factions.Factions
getInstance
-
-
-
-
Method Detail
-
getGson
public com.google.gson.Gson getGson()
-
getFile
public java.io.File getFile()
-
load
public void load()
- Overrides:
load
in classMemoryFactions
-
getNextId
public java.lang.String getNextId()
-
isIdFree
public boolean isIdFree(java.lang.String id)
-
isIdFree
public boolean isIdFree(int id)
-
updateNextIdForId
protected void updateNextIdForId(int id)
-
updateNextIdForId
protected void updateNextIdForId(java.lang.String id)
-
generateFactionObject
public Faction generateFactionObject()
- Specified by:
generateFactionObject
in classMemoryFactions
-
generateFactionObject
public Faction generateFactionObject(java.lang.String id)
- Specified by:
generateFactionObject
in classMemoryFactions
-
convertFrom
public void convertFrom(MemoryFactions old)
- Specified by:
convertFrom
in classMemoryFactions
-
-