public class StorageProxy
extends java.lang.Object
Constructor and Description |
---|
StorageProxy() |
Modifier and Type | Method and Description |
---|---|
static void |
clearAll()
Is called when resetting data.
|
static java.lang.Iterable<PokemonStorage> |
getAllCachedStorages()
Gets any currently cached storages
|
static PlayerPartyStorage |
getParty(net.minecraft.entity.player.ServerPlayerEntity player)
Gets the party of a specified Player
|
static PlayerPartyStorage |
getParty(java.util.UUID uuid)
Gets the party of the player
|
static PCStorage |
getPC(net.minecraft.entity.player.ServerPlayerEntity player,
PCTileEntity pc)
Gets the PC of a specified player.
|
static PCStorage |
getPCForPlayer(net.minecraft.entity.player.ServerPlayerEntity player)
Gets the PCStorage of a specified player
|
static PCStorage |
getPCForPlayer(java.util.UUID playerUUID)
Gets the PC for a specified player UUID
|
static Pokemon |
getPokemon(net.minecraft.entity.player.ServerPlayerEntity player,
StoragePosition position)
Gets a specific pokemon from a specific player at a specific StoragePosition
|
static StorageSaveAdapter |
getSaveAdapter()
Gives you the save adapter of the current storage manager.
|
static StorageSaveScheduler |
getSaveScheduler()
Gives you the save scheduler of the current storage manager.
|
static PokemonStorage |
getStorage(net.minecraft.entity.player.ServerPlayerEntity player,
StoragePosition position)
Gets the given pokemon storage of a given player at a certain storage position
|
static StorageManager |
getStorageManager()
Gives you the current storage manager
|
static boolean |
hasImplementation()
Checks if a storage manager has already been assigned
|
static void |
initializePCForPlayer(net.minecraft.entity.player.ServerPlayerEntity player,
PCStorage pc)
Callled when initializing a PC for a specified player
|
static void |
onStorageSaved(PokemonStorage storage)
Called when a given storage is saved
|
static void |
setStorageManager(StorageManager storageManager)
Sets the implementation of the storage manager
|
public static boolean hasImplementation()
public static void setStorageManager(StorageManager storageManager)
storageManager
- - The storage manager implementationpublic static StorageManager getStorageManager()
public static StorageSaveScheduler getSaveScheduler()
public static StorageSaveAdapter getSaveAdapter()
public static PCStorage getPCForPlayer(java.util.UUID playerUUID)
playerUUID
- - The UUID of the playerpublic static PlayerPartyStorage getParty(java.util.UUID uuid)
uuid
- - The UUID of the playerpublic static java.lang.Iterable<PokemonStorage> getAllCachedStorages()
public static void onStorageSaved(PokemonStorage storage)
storage
- - The storage being savedpublic static void clearAll()
public static PCStorage getPC(net.minecraft.entity.player.ServerPlayerEntity player, PCTileEntity pc)
player
- - The player who's pc you wantpc
- - The PCTileEntity being clickedpublic static PCStorage getPCForPlayer(net.minecraft.entity.player.ServerPlayerEntity player)
player
- - The player who's PCStorage to returnpublic static PlayerPartyStorage getParty(net.minecraft.entity.player.ServerPlayerEntity player)
player
- - The player who's party you wantpublic static PokemonStorage getStorage(net.minecraft.entity.player.ServerPlayerEntity player, StoragePosition position)
player
- - The player whos storage is wantedposition
- - The StoragePositionpublic static Pokemon getPokemon(net.minecraft.entity.player.ServerPlayerEntity player, StoragePosition position)
player
- - The player whos storage is wantedposition
- - The StoragePositionpublic static void initializePCForPlayer(net.minecraft.entity.player.ServerPlayerEntity player, PCStorage pc)
player
- - The player to initialize the PC forpc
- - The PCStorage to use during the initialization