001 package net.minecraft.world.storage;
002
003 import java.io.File;
004 import net.minecraft.nbt.NBTTagCompound;
005 import net.minecraft.world.MinecraftException;
006 import net.minecraft.world.WorldProvider;
007 import net.minecraft.world.chunk.storage.IChunkLoader;
008
009 public interface ISaveHandler
010 {
011 /**
012 * Loads and returns the world info
013 */
014 WorldInfo loadWorldInfo();
015
016 /**
017 * Checks the session lock to prevent save collisions
018 */
019 void checkSessionLock() throws MinecraftException;
020
021 /**
022 * Returns the chunk loader with the provided world provider
023 */
024 IChunkLoader getChunkLoader(WorldProvider var1);
025
026 /**
027 * Saves the given World Info with the given NBTTagCompound as the Player.
028 */
029 void saveWorldInfoWithPlayer(WorldInfo var1, NBTTagCompound var2);
030
031 /**
032 * Saves the passed in world info.
033 */
034 void saveWorldInfo(WorldInfo var1);
035
036 /**
037 * returns null if no saveHandler is relevent (eg. SMP)
038 */
039 IPlayerFileData getSaveHandler();
040
041 /**
042 * Called to flush all changes to disk, waiting for them to complete.
043 */
044 void flush();
045
046 /**
047 * Gets the file location of the given map
048 */
049 File getMapFileFromName(String var1);
050
051 /**
052 * Returns the name of the directory where world information is saved.
053 */
054 String getSaveDirectoryName();
055 }