*wipes sweat off brow, add /tps and /restart commands

By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot
2013-06-21 18:25:45 +10:00
parent 37369ecbbd
commit 4019e76015
20 changed files with 94 additions and 115 deletions

View File

@@ -1,4 +1,4 @@
From 21f77e26c9c80277b474d950860e63a27b0fd8f1 Mon Sep 17 00:00:00 2001
From 6b299bce7cd7b47541e5c780e09555b8e2fed3ff 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.
@@ -142,12 +142,12 @@ index 0000000..a5c4549
+ }
+}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index b5f3532..89b2927 100644
index 7825cfc..af567ac 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -114,4 +114,15 @@ public class SpigotConfig
@@ -135,4 +135,16 @@ public class SpigotConfig
{
preventProxies = getBoolean( "settings.prevent-proxies", false );
commands.put( "tps", new TicksPerSecondCommand( "tps" ) );
}
+
+ public static int timeoutTime = 60;
@@ -158,6 +158,7 @@ index b5f3532..89b2927 100644
+ timeoutTime = getInt( "settings.timeout-time", timeoutTime );
+ restartOnCrash = getBoolean( "settings.restart-on-crash", restartOnCrash );
+ restartScript = getString( "settings.restart-script", restartScript );
+ commands.put( "restart", new RestartCommand( "restart" ) );
+ WatchdogThread.doStart( timeoutTime, restartOnCrash );
+ }
}