public class PixelmonFileAdapter extends java.lang.Object implements StorageSaveAdapter
| Constructor and Description |
|---|
PixelmonFileAdapter() |
| Modifier and Type | Method and Description |
|---|---|
<T extends PokemonStorage> |
load(java.util.UUID uuid,
java.lang.Class<T> clazz)
Loads the specified type of
PokemonStorage saved under the specified UUID. |
void |
save(PokemonStorage storage)
Saves the given
PokemonStorage into persistent data. |
public void save(PokemonStorage storage)
StorageSaveAdapterPokemonStorage into persistent data. The UUID and storage
type can be derived from the parameter.save in interface StorageSaveAdapterstorage - The PokemonStorage that must be saved.public <T extends PokemonStorage> T load(java.util.UUID uuid, java.lang.Class<T> clazz)
StorageSaveAdapterPokemonStorage saved 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.load in interface StorageSaveAdapteruuid - The UUID of the storage to load. This is typically a player UUID, but
it's possible that custom PokemonStorage implementations work
differently.clazz - The class of PokemonStorage that must be loaded. In a normal
context, this will only include PlayerPartyStorage instances
and PCStorage instances, but if a custom storage manager is
in use then it is possible other classes will be passed into this.