diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-09 12:59:00 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-02-09 12:59:00 +0000 |
commit | 79883453680df3aa99127d699d8771ee7140111c (patch) | |
tree | 169222c27e72837b3bedb01feb8e81fa1950ecf3 /src | |
parent | 0592b334f670a26bf67a4930365a9efd39f50456 (diff) | |
download | craftbukkit-79883453680df3aa99127d699d8771ee7140111c.tar craftbukkit-79883453680df3aa99127d699d8771ee7140111c.tar.gz craftbukkit-79883453680df3aa99127d699d8771ee7140111c.tar.lz craftbukkit-79883453680df3aa99127d699d8771ee7140111c.tar.xz craftbukkit-79883453680df3aa99127d699d8771ee7140111c.zip |
Added call to new event on world save (at stop and force save). (Per EyvindRM)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/MinecraftServer.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 23ef042b..e476b48a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -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(); |