mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 07:34:48 +01:00
Fixed world.save, implemented autosave methods
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
f61f314d74
commit
378fdb506d
1 changed files with 13 additions and 4 deletions
|
@ -567,11 +567,20 @@ public class CraftWorld implements World {
|
|||
}
|
||||
|
||||
public void save() {
|
||||
// Writes level.dat
|
||||
world.saveLevel();
|
||||
boolean oldSave = world.canSave;
|
||||
|
||||
// Saves all chunks/regions
|
||||
world.chunkProvider.saveChunks(true, null);
|
||||
world.canSave = false;
|
||||
world.save(true, null);
|
||||
|
||||
world.canSave = oldSave;
|
||||
}
|
||||
|
||||
public boolean isAutoSave() {
|
||||
return !world.canSave;
|
||||
}
|
||||
|
||||
public void setAutoSave(boolean value) {
|
||||
world.canSave = !value;
|
||||
}
|
||||
|
||||
public boolean hasStorm() {
|
||||
|
|
Loading…
Reference in a new issue