Fix the restart command sometimes deadlocking the server

This commit is contained in:
Thinkofdeath 2014-06-14 16:01:05 +01:00
parent f2c8426b20
commit 7f6d9d1fb7

View File

@ -1,4 +1,4 @@
From 682ead1a06abe0e2bdf3237c8ffa05c4b260d72e Mon Sep 17 00:00:00 2001
From c839e6555ebfc524efef5b69ec68d1bc61f18087 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 12:33:20 +1100
Subject: [PATCH] Watchdog Thread.
@ -26,10 +26,10 @@ index 007fb86..51f1761 100644
}
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
new file mode 100644
index 0000000..10cb7c4
index 0000000..429c258
--- /dev/null
+++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -0,0 +1,117 @@
@@ -0,0 +1,124 @@
+package org.spigotmc;
+
+import java.io.File;
@ -55,7 +55,14 @@ index 0000000..10cb7c4
+ {
+ if ( testPermission( sender ) )
+ {
+ restart();
+ MinecraftServer.getServer().processQueue.add( new Runnable()
+ {
+ @Override
+ public void run()
+ {
+ restart();
+ }
+ } );
+ }
+ return true;
+ }