Update CB, refactor 0229-Fix-this-stupid-bullshit

Refactored 0229-Fix-this-stupid-bullshit in order to prevent merge conflicts
when spigot decides to update the timer and to provide some form of hint in the
console/log on startup.
This commit is contained in:
Shane Freeder
2017-09-15 15:37:05 +01:00
parent 0ccfc595a4
commit 9f7b45a945
3 changed files with 20 additions and 18 deletions

View File

@@ -3,27 +3,29 @@ From: DemonWav <demonwav@gmail.com>
Date: Sun, 6 Aug 2017 17:17:53 -0500 Date: Sun, 6 Aug 2017 17:17:53 -0500
Subject: [PATCH] Fix this stupid bullshit Subject: [PATCH] Fix this stupid bullshit
Disable the 15 second sleep when the server jar hasn't been rebuilt within a period of time.
modified in order to prevent merge conflicts when Spigot changes/disables the warning,
and to provide some level of hint without being disruptive.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index d3d848f8c..9faeef1dd 100644 index c9e8a8737..ae2c51f5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -0,0 +0,0 @@ public class Main { @@ -0,0 +0,0 @@ public class Main {
System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper Calendar deadline = Calendar.getInstance();
} deadline.add(Calendar.DAY_OF_YEAR, -14);
if (buildDate.before(deadline.getTime())) {
+ // Paper start - This is some stupid bullshit - System.err.println("*** Error, this build is outdated ***");
+ /* + // Paper start - This is some stupid bullshit
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { + System.err.println("*** Warning, you've not updated in a while! ***");
Date buildDate = new SimpleDateFormat("yyyyMMdd-HHmm").parse(Main.class.getPackage().getImplementationVendor()); System.err.println("*** Please download a new build as per instructions from https://paperci.emc.gs/ ***"); // Paper
- System.err.println("*** Server will start in 15 seconds ***");
@@ -0,0 +0,0 @@ public class Main { - Thread.sleep(TimeUnit.SECONDS.toMillis(15));
Thread.sleep(TimeUnit.SECONDS.toMillis(15)); + //System.err.println("*** Server will start in 15 seconds ***");
+ //Thread.sleep(TimeUnit.SECONDS.toMillis(15));
+ // Paper End
} }
} }
+ */
+ // Paper end
System.out.println("Loading libraries, please wait...");
MinecraftServer.main(options);
-- --

View File

@@ -336,7 +336,7 @@ index 5c36e7373..cb4b78e0e 100644
@Override @Override
public PluginCommand getPluginCommand(String name) { public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index ec9508e90..d3d848f8c 100644 index d565a720f..c9e8a8737 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -0,0 +0,0 @@ import java.util.logging.Logger; @@ -0,0 +0,0 @@ import java.util.logging.Logger;
@@ -375,7 +375,7 @@ index ec9508e90..d3d848f8c 100644
+ System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper + System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper
} }
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
deleted file mode 100644 deleted file mode 100644
index 26a2fb894..000000000 index 26a2fb894..000000000