Make restart command ignore async checks. This is needed for the watchdog to properly restart.
This commit is contained in:
parent
5164642604
commit
48d7a1a40f
|
@ -1,4 +1,4 @@
|
|||
From 75e785c9ed946fae0cf2dab990e115e540c8978d Mon Sep 17 00:00:00 2001
|
||||
From 7ceb5bfffc00229347fb53fea2f20cae5f8bf04d 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,21 +26,18 @@ index f9cbe47..2407ab2 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..922981e
|
||||
index 0000000..2d330fc
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/spigotmc/RestartCommand.java
|
||||
@@ -0,0 +1,112 @@
|
||||
@@ -0,0 +1,110 @@
|
||||
+package org.spigotmc;
|
||||
+
|
||||
+import java.io.File;
|
||||
+import java.util.List;
|
||||
+import net.minecraft.server.EntityPlayer;
|
||||
+import net.minecraft.server.IChatBaseComponent;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.PacketPlayOutKickDisconnect;
|
||||
+import org.bukkit.command.Command;
|
||||
+import org.bukkit.command.CommandSender;
|
||||
+import org.bukkit.craftbukkit.util.CraftChatMessage;
|
||||
+
|
||||
+public class RestartCommand extends Command
|
||||
+{
|
||||
|
@ -65,6 +62,7 @@ index 0000000..922981e
|
|||
+
|
||||
+ public static void restart()
|
||||
+ {
|
||||
+ AsyncCatcher.enabled = false; // Disable async catcher incase it interferes with us
|
||||
+ try
|
||||
+ {
|
||||
+ final File file = new File( SpigotConfig.restartScript );
|
||||
|
@ -289,5 +287,5 @@ index 0000000..de08ad6
|
|||
+ }
|
||||
+}
|
||||
--
|
||||
1.8.5.2.msysgit.0
|
||||
1.8.3.2
|
||||
|
||||
|
|
Loading…
Reference in New Issue