Skip to content

Commit 308456a

Browse files
committed
Version 1.7 fixes #4 #5
1 parent b1df2de commit 308456a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>net.moddedminecraft</groupId>
55
<artifactId>MMCReboot</artifactId>
6-
<version>1.6-API-${api}</version>
6+
<version>1.7-API-${api}</version>
77
<name>MMCReboot</name>
88
<description>
99
Restart plugin for sponge to allow server restart timers, countdowns and votes.

src/main/java/net/moddedminecraft/mmcreboot/Main.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import java.util.TimerTask;
4141
import java.util.concurrent.TimeUnit;
4242

43-
@Plugin(id = "mmcreboot", name = "MMCReboot", version = "1.6", authors = {"Leelawd93"})
43+
@Plugin(id = "mmcreboot", name = "MMCReboot", version = "1.7", authors = {"Leelawd93"})
4444
public class Main {
4545

4646
@Inject
@@ -220,6 +220,9 @@ public void setTPSRestarting(boolean bool) {
220220
TPSRestarting = bool;
221221
}
222222

223+
public void CheckTPSForRestart() {
224+
if (getTPS() < Config.tpsMinimum && Config.tpsEnabled && !getTPSRestarting()) {
225+
setTPSRestarting(true);
223226
Timer warnTimer = new Timer();
224227
warningTimers.add(warnTimer);
225228
warnTimer.schedule(new TimerTask() {
@@ -238,7 +241,7 @@ public void run() {
238241
scheduleTasks();
239242
}
240243
}
241-
}, 20000);
244+
}, 15000);
242245
}
243246
}
244247

0 commit comments

Comments
 (0)