mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 21:19:00 +01:00
Added call to new event on world save (at stop and force save). (Per EyvindRM)
This commit is contained in:
parent
0592b334f6
commit
7988345368
@ -18,7 +18,9 @@ import joptsimple.OptionSet;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.scheduler.CraftScheduler;
|
||||
// CraftBukkit end
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.world.WorldEvent;
|
||||
//CraftBukkit end
|
||||
|
||||
public class MinecraftServer implements ICommandListener, Runnable {
|
||||
|
||||
@ -173,6 +175,9 @@ public class MinecraftServer implements ICommandListener, Runnable {
|
||||
// Craftbukkit start
|
||||
for (WorldServer world : worlds) {
|
||||
world.a(true, (IProgressUpdate) null);
|
||||
|
||||
Event worldSaved = new WorldEvent( Event.Type.WORLD_SAVED, world.getWorld() );
|
||||
server.getPluginManager().callEvent( worldSaved );
|
||||
}
|
||||
// Craftbukkit end
|
||||
}
|
||||
@ -351,6 +356,9 @@ public class MinecraftServer implements ICommandListener, Runnable {
|
||||
// Craftbukkit start
|
||||
for (WorldServer world : worlds) {
|
||||
world.a(true, (IProgressUpdate) null);
|
||||
|
||||
Event worldSaved = new WorldEvent( Event.Type.WORLD_SAVED, world.getWorld() );
|
||||
server.getPluginManager().callEvent( worldSaved );
|
||||
}
|
||||
|
||||
this.f.d();
|
||||
|
Loading…
Reference in New Issue
Block a user