@ -12,6 +12,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.util.PathConverter;
|
||||
import org.fusesource.jansi.AnsiConsole;
|
||||
|
||||
public class Main {
|
||||
@ -57,6 +58,15 @@ public class Main {
|
||||
.ofType(Integer.class)
|
||||
.describedAs("Port");
|
||||
|
||||
accepts("serverId", "Server ID")
|
||||
.withRequiredArg();
|
||||
|
||||
accepts("jfrProfile", "Enable JFR profiling");
|
||||
|
||||
accepts("pidFile", "pid File")
|
||||
.withRequiredArg()
|
||||
.withValuesConvertedBy(new PathConverter());
|
||||
|
||||
acceptsAll(asList("o", "online-mode"), "Whether to use online authentication")
|
||||
.withRequiredArg()
|
||||
.ofType(Boolean.class)
|
||||
@ -183,11 +193,11 @@ public class Main {
|
||||
useConsole = false;
|
||||
}
|
||||
|
||||
if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
||||
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
||||
Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L);
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
|
||||
Reference in New Issue
Block a user