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.
This commit is contained in:
parent
c649585082
commit
e04368045e
|
@ -87,7 +87,7 @@ index bb2e55e97bf887a28cac7d4f9a0a23960d22cf56..04fa3991f6ce4e9dad804f28fc6c9476
|
|||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 5ffa98bb9c76d802a9d0ea6c572a704a2732c67c..22abd85da592c79e312928de596e5d552a45ef12 100644
|
||||
index 13100c688bfccb826b3072aaa92901f8634cf9ab..b9766b9b47547c400ed075f1635bb1461cb5e860 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -44,6 +44,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
|
@ -107,7 +107,7 @@ index 5ffa98bb9c76d802a9d0ea6c572a704a2732c67c..22abd85da592c79e312928de596e5d55
|
|||
try {
|
||||
Class<?> jarClass;
|
||||
try {
|
||||
@@ -220,6 +223,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
@@ -222,6 +225,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
pluginState = new IllegalStateException("Initial initialization");
|
||||
this.pluginInit = javaPlugin;
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ index ce751577623eaad0f31e2eb7bf0842d1ab73e845..31793f46e5623729dfb4048e901f2740
|
|||
for (PluginClassLoader loader : loaders) {
|
||||
try {
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 22abd85da592c79e312928de596e5d552a45ef12..cfa408e560d85311b474562a6d3860363727eff0 100644
|
||||
index b9766b9b47547c400ed075f1635bb1461cb5e860..87016d01640d8ea86b93cf2f7ead4c88b6d9d778 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -33,7 +33,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
|
@ -75,12 +75,12 @@ index 22abd85da592c79e312928de596e5d552a45ef12..cfa408e560d85311b474562a6d386036
|
|||
private final File dataFolder;
|
||||
private final File file;
|
||||
private final JarFile jar;
|
||||
@@ -117,7 +117,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
}
|
||||
@@ -118,7 +118,7 @@ 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) {
|
||||
|
|
|
@ -8,10 +8,10 @@ however, this provides no indication of the owner of the classloader, making
|
|||
these messages effectively useless, this patch rectifies this
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index e7a8a221a23d2adc497afd21e512eecba4c63a6b..11e5618ff66385574ba04db0942a75227cf8eb0f 100644
|
||||
index 87016d01640d8ea86b93cf2f7ead4c88b6d9d778..cb62666d14a8eeb6338ecef75d57a1946cfa99a4 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -226,4 +226,16 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
@@ -228,4 +228,16 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
||||
javaPlugin.logger = this.logger; // Paper - set logger
|
||||
javaPlugin.init(loader, loader.server, description, dataFolder, file, this);
|
||||
}
|
||||
|
|
|
@ -264,13 +264,13 @@ index 3fc047371e8f8a626e69697fad549d689c5dce89..a5d87d22cb1588d15e08da3b37e51c5e
|
|||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 036c870d991118e5c09eced8485b94579bc6782a..c6417a0594ffe2d3650ec54d44e575e347a1f724 100644
|
||||
index 4452427d0a8298d119ca29ef397b7a94f19eec28..46a16e31775b28c44f95a8ac5545ebcb656c74b6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -186,7 +186,7 @@ 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
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ index 0ed8e95d464cf17dc0355056775a9a375a4e7a86..2a05ef7553e3b05d5757e69e69c247e2
|
|||
@Override
|
||||
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
|
||||
index f1f658a90dcbb8d0b26a22c632cd7172e5d206ef..f474220105f58e0a889c78ae0b11873369a7f402 100644
|
||||
index b849b2afd009da433fe6cea5837b3ee9bb5c52b4..60d9980ccca6f1ac55b70f7684b917ddceac380a 100644
|
||||
--- a/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;
|
||||
|
@ -339,7 +339,7 @@ index f1f658a90dcbb8d0b26a22c632cd7172e5d206ef..f474220105f58e0a889c78ae0b118733
|
|||
+ 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) {
|
||||
@@ -232,7 +243,7 @@ public class Main {
|
||||
System.out.println("Unable to read system info");
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 04df07fe9a45f382bedd4ee83948382d3e7baae8
|
||||
Subproject commit 7e29f7654411f0a17ebbcc2c3f6a7dfe93bff39e
|
|
@ -1 +1 @@
|
|||
Subproject commit fae895ac110a830e4bbd5cc9eadbf70104ce215e
|
||||
Subproject commit 296df56673771692593156995684ab8041925d9d
|
Loading…
Reference in New Issue