Updated Upstream (CraftBukkit)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
35d3986e Disable log4j message formatting
040e0c3b Increase outdated build delay
This commit is contained in:
Nassim Jahnke 2021-12-09 21:59:59 +01:00
parent b475c6a683
commit 4e355c488d
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
14 changed files with 60 additions and 40 deletions

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index 139f377673414e1d0213129549e94934b511aa57..5f1792267c02d1ef4b25444f93ceee52a1dd0661 100644 index 9c4382ef7373110b6e72163779316ff40234a992..bba267ecca0121df22fdfa60961017863b5e3415 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -13,10 +13,9 @@ repositories { @@ -13,10 +13,9 @@ repositories {
@ -39,10 +39,10 @@ index 139f377673414e1d0213129549e94934b511aa57..5f1792267c02d1ef4b25444f93ceee52
for (tld in setOf("net", "com", "org")) { for (tld in setOf("net", "com", "org")) {
attributes("$tld/bukkit", "Sealed" to true) attributes("$tld/bukkit", "Sealed" to true)
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 189c262b22cad352fc87565ff499a5340d92b4e4..09c33e8613d31f4519109f29b44cfea754184c3f 100644 index dd755cbbf65614c010cc178d8945cf918b7be326..56f102a7b749a6294056d0f2db175f13970248a9 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
@@ -190,7 +190,7 @@ public class Main { @@ -192,7 +192,7 @@ public class Main {
} }
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
@ -50,7 +50,7 @@ index 189c262b22cad352fc87565ff499a5340d92b4e4..09c33e8613d31f4519109f29b44cfea7
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper + Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
Calendar deadline = Calendar.getInstance(); Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -7); deadline.add(Calendar.DAY_OF_YEAR, -14);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644 index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java

View File

@ -777,10 +777,10 @@ index ae0e8dc6fd3f8323c34df83450a16fc3c44a9e5e..980e5abe159ebfdf5334332b8d8201c0
+ // Paper end + // Paper end
} }
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 09c33e8613d31f4519109f29b44cfea754184c3f..aa4b21c9d3c4af08c4d3a309f948692cc585c9c9 100644 index 56f102a7b749a6294056d0f2db175f13970248a9..45b0da909136989d60c47bbff2ad9962f5c7f170 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
@@ -129,6 +129,14 @@ public class Main { @@ -131,6 +131,14 @@ public class Main {
.defaultsTo(new File("spigot.yml")) .defaultsTo(new File("spigot.yml"))
.describedAs("Yml file"); .describedAs("Yml file");
// Spigot End // Spigot End

View File

@ -66,10 +66,10 @@ index 59e619f745f62dec5a5fe304bbea75690a0b1663..23cba4bd17742733659aef498aa39d12
if (type == PluginLoadOrder.STARTUP) { if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear(); this.helpMap.clear();
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 aa4b21c9d3c4af08c4d3a309f948692cc585c9c9..e3bc3be320e6e2638b8a336c71d08152da84367d 100644 index 45b0da909136989d60c47bbff2ad9962f5c7f170..c5a9e3be2ad799752649b0d4ffeef8a3644f6d7b 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
@@ -136,6 +136,12 @@ public class Main { @@ -138,6 +138,12 @@ public class Main {
.ofType(File.class) .ofType(File.class)
.defaultsTo(new File("paper.yml")) .defaultsTo(new File("paper.yml"))
.describedAs("Yml file"); .describedAs("Yml file");

View File

@ -1891,13 +1891,13 @@ index b66b88475178f5a20a689f1af9a06f7f8e50ff9b..8df699de4ddde3089324f347a82d913f
+ // Paper end + // Paper end
} }
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 e3bc3be320e6e2638b8a336c71d08152da84367d..02376da4e087a7bfcb63ee2bf74aed49fe8439dc 100644 index c5a9e3be2ad799752649b0d4ffeef8a3644f6d7b..3a7a3709eb5e68663e7f6734d39179c3f69e17c6 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
@@ -19,6 +19,12 @@ public class Main { @@ -21,6 +21,12 @@ public class Main {
public static boolean useConsole = true;
public static void main(String[] args) { public static void main(String[] args) {
System.setProperty("log4j2.formatMsgNoLookups", "true");
+ // Paper start + // Paper start
+ final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected"); + final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");
+ if (false && System.getProperty(warnWhenLegacyFormattingDetected) == null) { + if (false && System.getProperty(warnWhenLegacyFormattingDetected) == null) {

View File

@ -45,11 +45,11 @@ index cf79b158c7fbbb3ccddd4472eceb27d6f238f489..cfdc78fe0820d47d8af055e844b08ea0
private final String bukkitVersion = Versioning.getBukkitVersion(); private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft"); private final Logger logger = Logger.getLogger("Minecraft");
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 02376da4e087a7bfcb63ee2bf74aed49fe8439dc..a1bbd6a89b9c829309a440375c6c8cbb75e7a48a 100644 index 3a7a3709eb5e68663e7f6734d39179c3f69e17c6..6300161cafb6efed7a262fa6b0b17d2f471fb2bb 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
@@ -216,12 +216,25 @@ public class Main { @@ -218,12 +218,25 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -7); deadline.add(Calendar.DAY_OF_YEAR, -14);
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/go/outdated-spigot ***"); - System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add server-name parameter
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 a1bbd6a89b9c829309a440375c6c8cbb75e7a48a..3bfbd12e973486aabbb42ea5e761313eac65e4ba 100644 index 6300161cafb6efed7a262fa6b0b17d2f471fb2bb..ed842f74fbd2de066cfbf8522c638ff2942e8197 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
@@ -149,6 +149,14 @@ public class Main { @@ -151,6 +151,14 @@ public class Main {
.defaultsTo(new File[] {}) .defaultsTo(new File[] {})
.describedAs("Jar file"); .describedAs("Jar file");
// Paper end // Paper end

View File

@ -19,7 +19,7 @@ Other changes:
configuration configuration
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index 5f1792267c02d1ef4b25444f93ceee52a1dd0661..f19ceb9aa0a4f1d59149ac4a933e191c78b55bda 100644 index bba267ecca0121df22fdfa60961017863b5e3415..b9ed067f776a47a977e90bb89cdd1768fd54eb2c 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -12,7 +12,17 @@ repositories { @@ -12,7 +12,17 @@ repositories {
@ -230,7 +230,7 @@ index 2201aeecd9936402825200dd696dc5607fe0f880..eed1d77a91f19722c2d2a3a43184565c
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream()); System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream()); System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream());
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 6e635a1cf5091aa7c4697de2a08414e053cc51a5..093b510293fdad471fd3dc9727b50699ae9bac8f 100644 index e47642c3164f7f7a358d2c7a9722643acf3e0089..dc891a463ec24b0b1b4c6c00b2c199e710204f61 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -155,8 +155,7 @@ public abstract class PlayerList { @@ -155,8 +155,7 @@ public abstract class PlayerList {
@ -278,7 +278,7 @@ index 93e3d587f7d1d621e8aedb8e53f38a8df21b5587..8bad6fa590cfe47e1216a160531f4cd1
@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 3bfbd12e973486aabbb42ea5e761313eac65e4ba..c1038935b32a5187c765418a4be97a31df966239 100644 index ed842f74fbd2de066cfbf8522c638ff2942e8197..8ab84e5591bbf2895f75b428f024760faa74d06d 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
@@ -12,7 +12,7 @@ import java.util.logging.Level; @@ -12,7 +12,7 @@ import java.util.logging.Level;
@ -290,7 +290,7 @@ index 3bfbd12e973486aabbb42ea5e761313eac65e4ba..c1038935b32a5187c765418a4be97a31
public class Main { public class Main {
public static boolean useJline = true; public static boolean useJline = true;
@@ -195,6 +195,8 @@ public class Main { @@ -197,6 +197,8 @@ public class Main {
} }
try { try {
@ -299,7 +299,7 @@ index 3bfbd12e973486aabbb42ea5e761313eac65e4ba..c1038935b32a5187c765418a4be97a31
// This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals // This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals
String jline_UnsupportedTerminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 'U', 'n', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l'}); String jline_UnsupportedTerminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 'U', 'n', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l'});
String jline_terminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l'}); String jline_terminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l'});
@@ -212,9 +214,18 @@ public class Main { @@ -214,9 +216,18 @@ public class Main {
// This ensures the terminal literal will always match the jline implementation // This ensures the terminal literal will always match the jline implementation
System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName()); System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName());
} }
@ -318,7 +318,7 @@ index 3bfbd12e973486aabbb42ea5e761313eac65e4ba..c1038935b32a5187c765418a4be97a31
} }
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
@@ -242,7 +253,7 @@ public class Main { @@ -244,7 +255,7 @@ public class Main {
System.out.println("Unable to read system info"); System.out.println("Unable to read system info");
} }
// Paper end // Paper end

View File

@ -31,12 +31,12 @@ index bf42e5687935022fe5bcb1ed40bab09bfe189e88..b111200a8f5d3255de29c9836f70fc7f
Bootstrap.isBootstrapped = true; Bootstrap.isBootstrapped = true;
if (Registry.REGISTRY.keySet().isEmpty()) { if (Registry.REGISTRY.keySet().isEmpty()) {
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 c1038935b32a5187c765418a4be97a31df966239..633cfb22039f22557d71cafcf42ea27f223b7b62 100644 index 8ab84e5591bbf2895f75b428f024760faa74d06d..8dc72669abcaed848bb872e6eea81cae064e11b9 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
@@ -234,10 +234,12 @@ public class Main { @@ -236,10 +236,12 @@ public class Main {
Calendar deadline = Calendar.getInstance(); Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -7); deadline.add(Calendar.DAY_OF_YEAR, -14);
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 ***");
+ // Paper start - This is some stupid bullshit + // Paper start - This is some stupid bullshit

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Allow overriding the java version check
-DPaper.IgnoreJavaVersion=true -DPaper.IgnoreJavaVersion=true
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 633cfb22039f22557d71cafcf42ea27f223b7b62..867c0802557375b63e69907bdb3ccd66644f1418 100644 index 8dc72669abcaed848bb872e6eea81cae064e11b9..d302ba1af03bd5921f4da02eaced3659990fc00a 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
@@ -191,7 +191,7 @@ public class Main { @@ -193,7 +193,7 @@ public class Main {
} }
if (javaVersion > 61.0) { if (javaVersion > 61.0) {
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 17 is supported."); System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 17 is supported.");

View File

@ -299,7 +299,7 @@ index 7bf4bf5cb2c1b54a7e2733091f48f3a824336d36..dcce05d2f4ab16424db4ab103a12188e
} }
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 2afcad405275ba635a311dde1ec616fa768d7148..d95c81277832edf929c2038fd7fbe67187f179b1 100644 index dbccf3c687cf52ca95934c274ae6949f600c7ca8..634a858e4e03968ada7c13e26e151d8f05ad611c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -834,6 +834,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -834,6 +834,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -311,7 +311,7 @@ index 2afcad405275ba635a311dde1ec616fa768d7148..d95c81277832edf929c2038fd7fbe671
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level.getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable); MinecraftServer.LOGGER.error(msg, throwable);
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 520645a8ee50e049e59c21fc57c88203f9a18993..bf0fa8c2b0beec9598bc3efdbe91380e6b4bab50 100644 index 8cfe47012b78eb582afff23ffcf758ca2e9dec95..d70bdf21dd7bdf01b34d0fd38e79f9b386ec1fcc 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1070,6 +1070,7 @@ public class LevelChunk extends ChunkAccess { @@ -1070,6 +1070,7 @@ public class LevelChunk extends ChunkAccess {
@ -336,7 +336,7 @@ index 8a0e1e7ac1c447d6e9b8807054aaa86820171e7b..264d1202d2efc6aeb89be17f74c0f142
// Paper start // Paper start
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 867c0802557375b63e69907bdb3ccd66644f1418..1ade239c9aacf2334c6dee773e0b37f3969723da 100644 index d302ba1af03bd5921f4da02eaced3659990fc00a..8a89fdc537a97fa5f1c30a1ae298e0fef95b4543 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
@@ -12,6 +12,8 @@ import java.util.logging.Level; @@ -12,6 +12,8 @@ import java.util.logging.Level;
@ -348,7 +348,7 @@ index 867c0802557375b63e69907bdb3ccd66644f1418..1ade239c9aacf2334c6dee773e0b37f3
import net.minecrell.terminalconsole.TerminalConsoleAppender; // Paper import net.minecrell.terminalconsole.TerminalConsoleAppender; // Paper
public class Main { public class Main {
@@ -162,6 +164,36 @@ public class Main { @@ -164,6 +166,36 @@ public class Main {
OptionSet options = null; OptionSet options = null;
@ -385,7 +385,7 @@ index 867c0802557375b63e69907bdb3ccd66644f1418..1ade239c9aacf2334c6dee773e0b37f3
try { try {
options = parser.parse(args); options = parser.parse(args);
} catch (joptsimple.OptionException ex) { } catch (joptsimple.OptionException ex) {
@@ -261,8 +293,64 @@ public class Main { @@ -263,8 +295,64 @@ public class Main {
} catch (Throwable t) { } catch (Throwable t) {
t.printStackTrace(); t.printStackTrace();
} }

View File

@ -17,10 +17,10 @@ keeping long lived large direct buffers in cache.
Set system properly at server startup if not set already to help protect from this. Set system properly at server startup if not set already to help protect from this.
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 1ade239c9aacf2334c6dee773e0b37f3969723da..450518903c0a10301b177d8dd7fe05aca3b8b37e 100644 index 8a89fdc537a97fa5f1c30a1ae298e0fef95b4543..461c086d82514d2558d3f472b675305248619d8c 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
@@ -28,6 +28,7 @@ public class Main { @@ -30,6 +30,7 @@ public class Main {
} }
// Paper end // Paper end
// Todo: Installation script // Todo: Installation script

View File

@ -133,7 +133,7 @@ index ddac6663a164ce362773cab3257e867a418a17a0..2c6f065299431099e0066d9ad74421ec
this.manager = manager; this.manager = manager;
} }
diff --git a/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java b/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java diff --git a/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java b/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java
index 267085788482dbc8f8252b8a4fc42259d3de45e4..2d7604fee68c27f644e1c2915f09758ee7c15cb8 100644 index 267085788482dbc8f8252b8a4fc42259d3de45e4..b9da6aea2f0b114fb53f20a1ad767398d8bdc38c 100644
--- a/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java --- a/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java
+++ b/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java +++ b/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java
@@ -17,31 +17,69 @@ @@ -17,31 +17,69 @@
@ -210,7 +210,7 @@ index 267085788482dbc8f8252b8a4fc42259d3de45e4..2d7604fee68c27f644e1c2915f09758e
} }
/** /**
@@ -168,7 +206,54 @@ public class JndiManager extends AbstractManager { @@ -168,7 +206,55 @@ public class JndiManager extends AbstractManager {
* @throws NamingException if a naming exception is encountered * @throws NamingException if a naming exception is encountered
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@ -261,12 +261,13 @@ index 267085788482dbc8f8252b8a4fc42259d3de45e4..2d7604fee68c27f644e1c2915f09758e
+ } + }
+ } + }
+ } catch (URISyntaxException ex) { + } catch (URISyntaxException ex) {
+ // This is OK. + LOGGER.warn("Invalid JNDI URI - {}", name);
+ return null;
+ } + }
return (T) this.context.lookup(name); return (T) this.context.lookup(name);
} }
@@ -176,13 +261,36 @@ public class JndiManager extends AbstractManager { @@ -176,13 +262,36 @@ public class JndiManager extends AbstractManager {
@Override @Override
public JndiManager createManager(final String name, final Properties data) { public JndiManager createManager(final String name, final Properties data) {

View File

@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <jahnke.nassim@gmail.com>
Date: Thu, 9 Dec 2021 21:59:08 +0100
Subject: [PATCH] Don't disable log4j lookups
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 461c086d82514d2558d3f472b675305248619d8c..deb33456b5b194a662cbdbacf17752c87f2cecaf 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -21,7 +21,7 @@ public class Main {
public static boolean useConsole = true;
public static void main(String[] args) {
- System.setProperty("log4j2.formatMsgNoLookups", "true");
+ //System.setProperty("log4j2.formatMsgNoLookups", "true"); // Paper - no...
// Paper start
final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");

@ -1 +1 @@
Subproject commit 3c2af1b7f5b43ed91c2e4096f1e164c551111074 Subproject commit 35d3986e9ec4ffba0f025897ae87cd5991b9fa9a