public class LevelStorage.Session extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
private Path |
directory |
private String |
directoryName |
private SessionLock |
lock |
| Constructor and Description |
|---|
Session(LevelStorage levelStorage,
String directoryName) |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkValid() |
void |
close() |
boolean |
convert(ProgressListener progressListener) |
long |
createBackup() |
WorldSaveHandler |
createSaveHandler(MinecraftServer server) |
void |
deleteSessionLock() |
Path |
getDirectory() |
String |
getDirectoryName() |
File |
getIconFile() |
boolean |
needsConversion() |
LevelProperties |
readLevelProperties() |
void |
save(String name) |
private final SessionLock lock
private final Path directory
private final String directoryName
public Session(LevelStorage levelStorage, String directoryName) throws IOException
IOExceptionpublic String getDirectoryName()
public Path getDirectory()
private void checkValid()
public WorldSaveHandler createSaveHandler(@Nullable MinecraftServer server)
public boolean needsConversion()
public boolean convert(ProgressListener progressListener)
@Nullable public LevelProperties readLevelProperties()
public File getIconFile()
@Environment(value=CLIENT)
public void deleteSessionLock()
throws IOException
IOException@Environment(value=CLIENT) public void save(String name) throws IOException
IOException@Environment(value=CLIENT)
public long createBackup()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface AutoCloseableIOException