Klasse AbstractSave
java.lang.Object
com.viaversion.viafabricplus.save.AbstractSave
- Bekannte direkte Unterklassen:
AccountsSave,SettingsSave
This class can be used to save data to a file.
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetPath()voidinit()This method should be called when the file should be initialized.voidpostInit()abstract voidread(com.google.gson.JsonObject object) voidsave()This method should be called when the file should be saved.abstract voidwrite(com.google.gson.JsonObject object)
-
Felddetails
-
GSON
public static final com.google.gson.Gson GSON
-
-
Konstruktordetails
-
AbstractSave
- Parameter:
name- The name of the file.
-
-
Methodendetails
-
init
public void init()This method should be called when the file should be initialized. It will read the file and call theread(JsonObject)method. -
save
public void save()This method should be called when the file should be saved. -
write
public abstract void write(com.google.gson.JsonObject object) -
read
public abstract void read(com.google.gson.JsonObject object) -
postInit
public void postInit() -
getPath
-