Interface ResearchStorageSaveScheduler

All Known Implementing Classes:
PixelmonStorageAsyncScheduler

public interface ResearchStorageSaveScheduler
Interface responsible for scheduling storage saving using the appropriate ResearchStorageSaveAdapter. A default method is provided for doing a save for a single abstract storage using the storage manager's save adapter.

This class will be registered on the Forge event bus by the Pixelmon class after the PixelmonInitEvent

Since:
August 6, 2024 (Pixelmon 9.2.9)
  • Method Details

    • getScheduler

      Executor getScheduler()
      Gets the executor that is used to schedule saving logic
      Returns:
      The executor
    • onServerStopping

      void onServerStopping(net.minecraftforge.event.server.ServerStoppingEvent event)
      Called from the Pixelmon class when the server stopping event is fired. This is mandatory as otherwise data may be lost on server shutdown
      Parameters:
      event - Shutdown event
    • save

      default void save(ResearchStorage storage)
      Saves the storage using the StorageProxy.getSaveAdapter()
      Parameters:
      storage - The storage to save