public interface IStorageSaveAdapter
PokemonStorages. The only provided implementation is the
ReforgedFileAdapterwhich writes into the traditional .pk and .comp files. However, custom implementations can handle this in any way as long as
load(UUID, Class)never returns null.
|Modifier and Type||Method and Description|
Loads the specified type of
Saves the given
void save(PokemonStorage storage)
PokemonStorageinto persistent data. The UUID and storage type can be derived from the parameter.
PokemonStoragethat must be saved.
@Nonnull <T extends PokemonStorage> T load(java.util.UUID uuid, java.lang.Class<T> clazz)
PokemonStoragesaved 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.
uuid- The UUID of the storage to load. This is typically a player UUID, but it's possible that custom
PokemonStorageimplementations work differently.
clazz- The class of
PokemonStoragethat must be loaded. In a normal context, this will only include
PCStorageinstances, but if a custom storage manager is in use then it is possible other classes will be passed into this.