mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-04 02:01:44 +01:00
Tweak outdated windows
This commit is contained in:
parent
5d489ff4ee
commit
2f17f677aa
1 changed files with 3 additions and 3 deletions
|
@ -181,12 +181,12 @@ public class Main {
|
||||||
Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor());
|
Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor());
|
||||||
|
|
||||||
Calendar deadline = Calendar.getInstance();
|
Calendar deadline = Calendar.getInstance();
|
||||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
deadline.add(Calendar.DAY_OF_YEAR, -5);
|
||||||
if (buildDate.before(deadline.getTime())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
System.err.println("*** Error, this build is outdated ***");
|
System.err.println("*** Error, this build is outdated ***");
|
||||||
System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/ ***");
|
System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/ ***");
|
||||||
System.err.println("*** Server will start in 15 seconds ***");
|
System.err.println("*** Server will start in 20 seconds ***");
|
||||||
Thread.sleep(TimeUnit.SECONDS.toMillis(15));
|
Thread.sleep(TimeUnit.SECONDS.toMillis(20));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue