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