From 7369abbfa26d55fd80023d25043a244b3a11d800 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 10 Jun 2021 21:35:13 -0700 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit) (#5794) 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 Bukkit Changes: 7e29f765 SPIGOT-6502: Loading a class from a library of another plugin resulted in a ClassCastException. CraftBukkit Changes: 296df566 Remove outdated build delay. --- .../Prioritise-own-classes-where-possible.patch | 6 +++--- Spigot-Server-Patches/POM-Changes.patch | 2 +- ...e-TerminalConsoleAppender-for-console-improvements.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Spigot-API-Patches/Prioritise-own-classes-where-possible.patch b/Spigot-API-Patches/Prioritise-own-classes-where-possible.patch index f72e697a4..3826df329 100644 --- a/Spigot-API-Patches/Prioritise-own-classes-where-possible.patch +++ b/Spigot-API-Patches/Prioritise-own-classes-where-possible.patch @@ -76,11 +76,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final File file; private final JarFile jar; @@ -0,0 +0,0 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot - } if (checkGlobal) { + // This ignores the libraries of other plugins, unless they are transitive dependencies. - Class result = loader.getClassByName(name, resolve, description); + Class result = loader.getClassByName(name, resolve, description, this); // Paper - prioritize self - if (result != null) { - PluginDescriptionFile provider = ((PluginClassLoader) result.getClassLoader()).description; + // If the class was loaded from a library instead of a PluginClassLoader, we can assume that its associated plugin is a transitive dependency and can therefore skip this check. + if (result != null && result.getClassLoader() instanceof PluginClassLoader) { diff --git a/Spigot-Server-Patches/POM-Changes.patch b/Spigot-Server-Patches/POM-Changes.patch index 59dfc305e..6d7520f4a 100644 --- a/Spigot-Server-Patches/POM-Changes.patch +++ b/Spigot-Server-Patches/POM-Changes.patch @@ -270,7 +270,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class Main { } - if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { + if (false && Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) { - Date buildDate = new Date(Integer.parseInt(Main.class.getPackage().getImplementationVendor()) * 1000L); + Date buildDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'").parse(Main.class.getPackage().getImplementationVendor()); // Paper diff --git a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch index c39bcbe69..029125f61 100644 --- a/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/Spigot-Server-Patches/Use-TerminalConsoleAppender-for-console-improvements.patch @@ -339,7 +339,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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) { @@ -0,0 +0,0 @@ public class Main { System.out.println("Unable to read system info"); } diff --git a/work/Bukkit b/work/Bukkit index 04df07fe9..7e29f7654 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 04df07fe9a45f382bedd4ee83948382d3e7baae8 +Subproject commit 7e29f7654411f0a17ebbcc2c3f6a7dfe93bff39e diff --git a/work/CraftBukkit b/work/CraftBukkit index fae895ac1..296df5667 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit fae895ac110a830e4bbd5cc9eadbf70104ce215e +Subproject commit 296df56673771692593156995684ab8041925d9d