Airplane patches

This commit is contained in:
William Blake Galbreath
2021-08-18 14:55:29 -05:00
parent 1105e10284
commit d783ad703b
296 changed files with 3931 additions and 311 deletions

View File

@@ -0,0 +1,58 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Paul Sauve <paul@technove.co>
Date: Sat, 19 Dec 2020 19:06:37 -0600
Subject: [PATCH] Airplane API Changes
Copyright (C) 2020 Technove LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 1ab107d5bb20b9a12fc8843513bd9a3ada50c0a3..70aa79c0bfde6aea8031eeb69124344ab3af5c27 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -46,6 +46,8 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
private final Set<String> seenIllegalAccess = Collections.newSetFromMap(new ConcurrentHashMap<>());
private java.util.logging.Logger logger; // Paper - add field
+ private boolean closed = false; // Airplane
+
static {
ClassLoader.registerAsParallelCapable();
}
@@ -146,6 +148,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
throw new ClassNotFoundException(name);
}
+ public boolean _airplane_hasClass(@NotNull String name) { return this.classes.containsKey(name); } // Airplane
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) {
@@ -153,7 +156,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
}
Class<?> result = classes.get(name);
- if (result == null) {
+ if (result == null && !this.closed) { // Airplane
String path = name.replace('.', '/').concat(".class");
JarEntry entry = jar.getJarEntry(path);
@@ -208,6 +211,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
try {
super.close();
} finally {
+ this.closed = true; // Airplane
jar.close();
}
}

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Ridables
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 659193fc0596084031c09aa47fbb428a93d052e8..e1f871812e563605e31837159f129d69e05b868f 100644
index fb0c77c66ca117eaff9487a41f1e280afe6253c6..24d992243c1fac9fa90053c0c9981107650de65e 100644
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -196,6 +196,11 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {

View File

@@ -141,7 +141,7 @@ index 0000000000000000000000000000000000000000..3250bd4dc29a0cf79b08833d95a3321d
+ }
+}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index 460fda05a62b12db2edcfb7ea8b2a5dd8e4b110d..1e0eb099933dded131d3c4db8f3cca2b6ed8e064 100644
index 74252236b138969560e6513f24e7ecc6dc4a4127..c12de7917ab074083c9758645a403b501455a49d 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -147,6 +147,19 @@ public class SimpleCommandMap implements CommandMap {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Phantoms attracted to crystals and crystals shoot phantoms
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index e1f871812e563605e31837159f129d69e05b868f..48c98de78eda6d5414c17ddb776a13e0bf0275b8 100644
index 24d992243c1fac9fa90053c0c9981107650de65e..ed8edd7fe6e88141a1b4cbb0bf4d17ebb1bbf554 100644
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -199,6 +199,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Add option to disable zombie aggressiveness towards villagers
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 48c98de78eda6d5414c17ddb776a13e0bf0275b8..a732d78fe75e4d837b2a04d1fdeb1d07fe820a8e 100644
index ed8edd7fe6e88141a1b4cbb0bf4d17ebb1bbf554..e86034d886a763907145be32eb33718726cf4b79 100644
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -201,6 +201,8 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Rabid Wolf API
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index a732d78fe75e4d837b2a04d1fdeb1d07fe820a8e..5e99bdbbb81d7ea366838c2f688417f11e607210 100644
index e86034d886a763907145be32eb33718726cf4b79..0f8f55685fff69b8cf5e1d4771bfda84980d0f74 100644
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -203,6 +203,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Iron golem poppy calms anger
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 5e99bdbbb81d7ea366838c2f688417f11e607210..7921f2766f16fbd49e2afd0bba0ef30f6eefd0ce 100644
index 0f8f55685fff69b8cf5e1d4771bfda84980d0f74..c7786c4ce66c04b477ab720b2f2dd2589e8e9b98 100644
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -204,6 +204,7 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {