summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-02-09 12:59:00 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-02-09 12:59:00 +0000
commit79883453680df3aa99127d699d8771ee7140111c (patch)
tree169222c27e72837b3bedb01feb8e81fa1950ecf3
parent0592b334f670a26bf67a4930365a9efd39f50456 (diff)
downloadcraftbukkit-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)
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java10
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();