Class PixelmonStorageStandardScheduler
java.lang.Object
com.pixelmonmod.pixelmon.storage.schedulers.PixelmonStorageStandardScheduler
- All Implemented Interfaces:
StorageSaveScheduler
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the executor that is used to schedule saving logicvoid
onServerStopping
(net.minecraftforge.event.server.ServerStoppingEvent event) Called from thePixelmon
class when the server stopping event is fired.void
onWorldSave
(net.minecraftforge.event.level.LevelEvent.Save event) void
saveAll()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.storage.StorageSaveScheduler
save
-
Field Details
-
lastSaveTick
protected int lastSaveTick
-
-
Constructor Details
-
PixelmonStorageStandardScheduler
public PixelmonStorageStandardScheduler()
-
-
Method Details
-
getScheduler
Description copied from interface:StorageSaveScheduler
Gets the executor that is used to schedule saving logic- Specified by:
getScheduler
in interfaceStorageSaveScheduler
- Returns:
- The executor
-
onServerStopping
public void onServerStopping(net.minecraftforge.event.server.ServerStoppingEvent event) Description copied from interface:StorageSaveScheduler
Called from thePixelmon
class when the server stopping event is fired. This is mandatory as otherwise data may be lost on server shutdown- Specified by:
onServerStopping
in interfaceStorageSaveScheduler
- Parameters:
event
- Shutdown event
-
onWorldSave
public void onWorldSave(net.minecraftforge.event.level.LevelEvent.Save event) -
saveAll
public void saveAll()
-