Class NBTStorageSaveAdapter
java.lang.Object
com.pixelmonmod.pixelmon.storage.adapters.NBTStorageSaveAdapter
- All Implemented Interfaces:
FlatFileStorageSaveAdapter,StorageSaveAdapter
public class NBTStorageSaveAdapter
extends Object
implements StorageSaveAdapter, FlatFileStorageSaveAdapter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFile(PokemonStorage storage) <T extends PokemonStorage>
CompletableFuture<T>Loads the specified type ofPokemonStoragesaved under the specified UUID.voidsave(PokemonStorage storage) Saves the givenPokemonStorageinto persistent data.
-
Constructor Details
-
NBTStorageSaveAdapter
public NBTStorageSaveAdapter()
-
-
Method Details
-
getFile
- Specified by:
getFilein interfaceFlatFileStorageSaveAdapter
-
save
Description copied from interface:StorageSaveAdapterSaves the givenPokemonStorageinto persistent data. The UUID and storage type can be derived from the parameter.- Specified by:
savein interfaceStorageSaveAdapter- Parameters:
storage- ThePokemonStoragethat must be saved.
-
load
Description copied from interface:StorageSaveAdapterLoads the specified type ofPokemonStoragesaved under the specified UUID. The returned value must not be null. If a storage for the UUID and class does not already exist, it must be created and returned.- Specified by:
loadin interfaceStorageSaveAdapter- Parameters:
uuid- The UUID of the storage to load. This is typically a player UUID, but it's possible that customPokemonStorageimplementations work differently.clazz- The class ofPokemonStoragethat must be loaded. In a normal context, this will only includePlayerPartyStorageinstances andPCStorageinstances, but if a custom storage manager is in use then it is possible other classes will be passed into this.
-