mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 17:31:06 +01:00
All worlds should be saved on save-all. Player data should be saved when a save occurs.
This commit is contained in:
parent
685d4dbb3f
commit
43e36b5bdc
2 changed files with 4 additions and 2 deletions
|
@ -28,7 +28,7 @@ public class ConsoleCommandHandler {
|
||||||
this.b.a();
|
this.b.a();
|
||||||
} else if (s.toLowerCase().startsWith("save-all")) {
|
} else if (s.toLowerCase().startsWith("save-all")) {
|
||||||
this.a(s1, "Forcing save..");
|
this.a(s1, "Forcing save..");
|
||||||
worldserver.a(true, (IProgressUpdate) null);
|
this.b.f(); // CraftBukkit - We should save all worlds on save-all.
|
||||||
this.a(s1, "Save complete.");
|
this.a(s1, "Save complete.");
|
||||||
} else if (s.toLowerCase().startsWith("save-off")) {
|
} else if (s.toLowerCase().startsWith("save-off")) {
|
||||||
this.a(s1, "Disabling level saving..");
|
this.a(s1, "Disabling level saving..");
|
||||||
|
|
|
@ -198,7 +198,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
|
||||||
server.loadPlugins(); // CraftBukkit
|
server.loadPlugins(); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
private void f() {
|
void f() { //CraftBukkit - private -> default
|
||||||
a.info("Saving chunks");
|
a.info("Saving chunks");
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
|
@ -209,6 +209,8 @@ public class MinecraftServer implements Runnable, ICommandListener {
|
||||||
WorldEvent event = new WorldEvent( Event.Type.WORLD_SAVED, world.getWorld() );
|
WorldEvent event = new WorldEvent( Event.Type.WORLD_SAVED, world.getWorld() );
|
||||||
server.getPluginManager().callEvent( event );
|
server.getPluginManager().callEvent( event );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.f.d(); // CraftBukkit - player data should be saved whenever a save happens.
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue