summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-03-29 21:01:04 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-03-29 21:01:04 +0100
commit2ac43ce2232d0c9b95276ee48ac6f21340a90323 (patch)
treedde9bf56d184b6ce198dc293e113dc638897f0c8 /src/main/java/org
parentb37dd48ae5ec70f1bc763de1e4aa69c4321f18ed (diff)
downloadcraftbukkit-2ac43ce2232d0c9b95276ee48ac6f21340a90323.tar
craftbukkit-2ac43ce2232d0c9b95276ee48ac6f21340a90323.tar.gz
craftbukkit-2ac43ce2232d0c9b95276ee48ac6f21340a90323.tar.lz
craftbukkit-2ac43ce2232d0c9b95276ee48ac6f21340a90323.tar.xz
craftbukkit-2ac43ce2232d0c9b95276ee48ac6f21340a90323.zip
Ctrl+C saves world before stopping
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
new file mode 100644
index 00000000..d15bb782
--- /dev/null
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -0,0 +1,17 @@
+
+package org.bukkit.craftbukkit.util;
+
+import net.minecraft.server.MinecraftServer;
+
+public class ServerShutdownThread extends Thread {
+ private final MinecraftServer server;
+
+ public ServerShutdownThread(MinecraftServer server) {
+ this.server = server;
+ }
+
+ @Override
+ public void run() {
+ server.g();
+ }
+}