public class SaveHandler extends java.lang.Object implements ISaveHandler, IPlayerFileData
| Constructor and Description |
|---|
SaveHandler(java.io.File p_i2146_1_,
java.lang.String p_i2146_2_,
boolean p_i2146_3_) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkSessionLock()
Checks the session lock to prevent save collisions
|
void |
flush()
Called to flush all changes to disk, waiting for them to complete.
|
java.lang.String[] |
getAvailablePlayerDat()
Returns an array of usernames for which player.dat exists for.
|
IChunkLoader |
getChunkLoader(WorldProvider p_75763_1_)
Returns the chunk loader with the provided world provider
|
java.io.File |
getMapFileFromName(java.lang.String p_75758_1_)
Gets the file location of the given map
|
NBTTagCompound |
getPlayerNBT(EntityPlayerMP player) |
IPlayerFileData |
getSaveHandler()
returns null if no saveHandler is relevent (eg.
|
java.io.File |
getWorldDirectory()
Gets the File object corresponding to the base directory of this world.
|
java.lang.String |
getWorldDirectoryName()
Returns the name of the directory where world information is saved.
|
WorldInfo |
loadWorldInfo()
Loads and returns the world info
|
NBTTagCompound |
readPlayerData(EntityPlayer p_75752_1_)
Reads the player data from disk into the specified PlayerEntityMP.
|
void |
saveWorldInfo(WorldInfo p_75761_1_)
Saves the passed in world info.
|
void |
saveWorldInfoWithPlayer(WorldInfo p_75755_1_,
NBTTagCompound p_75755_2_)
Saves the given World Info with the given NBTTagCompound as the Player.
|
void |
writePlayerData(EntityPlayer p_75753_1_)
Writes the player data to disk from the specified PlayerEntityMP.
|
public SaveHandler(java.io.File p_i2146_1_,
java.lang.String p_i2146_2_,
boolean p_i2146_3_)
public java.io.File getWorldDirectory()
getWorldDirectory in interface ISaveHandlerpublic void checkSessionLock()
throws MinecraftException
checkSessionLock in interface ISaveHandlerMinecraftExceptionpublic IChunkLoader getChunkLoader(WorldProvider p_75763_1_)
getChunkLoader in interface ISaveHandlerpublic WorldInfo loadWorldInfo()
loadWorldInfo in interface ISaveHandlerpublic void saveWorldInfoWithPlayer(WorldInfo p_75755_1_, NBTTagCompound p_75755_2_)
saveWorldInfoWithPlayer in interface ISaveHandlerpublic void saveWorldInfo(WorldInfo p_75761_1_)
saveWorldInfo in interface ISaveHandlerpublic void writePlayerData(EntityPlayer p_75753_1_)
writePlayerData in interface IPlayerFileDatapublic NBTTagCompound readPlayerData(EntityPlayer p_75752_1_)
readPlayerData in interface IPlayerFileDatapublic IPlayerFileData getSaveHandler()
getSaveHandler in interface ISaveHandlerpublic java.lang.String[] getAvailablePlayerDat()
getAvailablePlayerDat in interface IPlayerFileDatapublic void flush()
flush in interface ISaveHandlerpublic java.io.File getMapFileFromName(java.lang.String p_75758_1_)
getMapFileFromName in interface ISaveHandlerpublic java.lang.String getWorldDirectoryName()
getWorldDirectoryName in interface ISaveHandlerpublic NBTTagCompound getPlayerNBT(EntityPlayerMP player)