Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 05:20:07 +01:00
Fixed world.save, implemented autosave methods
Dieser Commit ist enthalten in:
Ursprung
0c20045964
Commit
7c491b7bc7
@ -567,11 +567,20 @@ public class CraftWorld implements World {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void save() {
|
public void save() {
|
||||||
// Writes level.dat
|
boolean oldSave = world.canSave;
|
||||||
world.saveLevel();
|
|
||||||
|
|
||||||
// Saves all chunks/regions
|
world.canSave = false;
|
||||||
world.chunkProvider.saveChunks(true, null);
|
world.save(true, null);
|
||||||
|
|
||||||
|
world.canSave = oldSave;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isAutoSave() {
|
||||||
|
return !world.canSave;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAutoSave(boolean value) {
|
||||||
|
world.canSave = !value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasStorm() {
|
public boolean hasStorm() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren