Class SimplePokeDexStorageManager
java.lang.Object
com.pixelmonmod.pixelmon.api.pokedex.storage.impl.SimplePokeDexStorageManager
- All Implemented Interfaces:
PokeDexStorageManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map
<UUID, LoadingData<PokedexStorage>> protected final Map
<UUID, PokedexStorage> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearAll()
Clears the cache of all storagesGets all the cachedPokedexStorage
this implementation is storinggetStorage
(UUID uuid) Gets the player's pokdex storage waiting until it is loaded from the file if necessaryvoid
invalidateCache
(PokedexStorage storage) Removes the cache of the given storageprotected LoadingData
<PokedexStorage> loadStorage
(UUID uuid) void
onPlayerLoad
(net.neoforged.neoforge.event.entity.player.PlayerEvent.LoadFromFile event) void
onPlayerLogin
(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent event) void
onPlayerLogout
(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent event) void
onWorldSave
(net.neoforged.neoforge.event.level.LevelEvent.Save event) 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.pokedex.storage.PokeDexStorageManager
getStorage, getStorageNow, getStorageNow
-
Field Details
-
storages
-
loadingStorages
-
-
Constructor Details
-
SimplePokeDexStorageManager
public SimplePokeDexStorageManager()
-
-
Method Details
-
invalidateCache
Description copied from interface:PokeDexStorageManager
Removes the cache of the given storage- Specified by:
invalidateCache
in interfacePokeDexStorageManager
- Parameters:
storage
- The storage to remove
-
getStorage
Description copied from interface:PokeDexStorageManager
Gets the player's pokdex storage waiting until it is loaded from the file if necessary- Specified by:
getStorage
in interfacePokeDexStorageManager
- Parameters:
uuid
- The player- Returns:
- The future pokdex storage
-
loadStorage
-
getAllCachedStorages
Description copied from interface:PokeDexStorageManager
Gets all the cachedPokedexStorage
this implementation is storing- Specified by:
getAllCachedStorages
in interfacePokeDexStorageManager
- Returns:
- The cached storages
-
clearAll
public void clearAll()Description copied from interface:PokeDexStorageManager
Clears the cache of all storages- Specified by:
clearAll
in interfacePokeDexStorageManager
-
onPlayerLogin
public void onPlayerLogin(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent event) -
onPlayerLoad
public void onPlayerLoad(net.neoforged.neoforge.event.entity.player.PlayerEvent.LoadFromFile event) -
onPlayerLogout
public void onPlayerLogout(net.neoforged.neoforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent event) -
onWorldSave
public void onWorldSave(net.neoforged.neoforge.event.level.LevelEvent.Save event)
-