aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0019-Paper-Plugins.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0019-Paper-Plugins.patch')
-rw-r--r--patches/server/0019-Paper-Plugins.patch73
1 files changed, 42 insertions, 31 deletions
diff --git a/patches/server/0019-Paper-Plugins.patch b/patches/server/0019-Paper-Plugins.patch
index 11ab0c0b9a..1fdf462bb3 100644
--- a/patches/server/0019-Paper-Plugins.patch
+++ b/patches/server/0019-Paper-Plugins.patch
@@ -7257,7 +7257,7 @@ index 5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0..6afede80c10503a261d0f735c351d943
Bootstrap.validate();
Util.startTimerHackThread();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9f9932416 100644
+index 492af80bc4a252ad3b82aef0c46c3e6625ec9146..3d98004af5c872f8a183476183d1cc89a2aac4b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -277,7 +277,8 @@ public final class CraftServer implements Server {
@@ -7270,7 +7270,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
private final StructureManager structureManager;
protected final DedicatedServer console;
protected final DedicatedPlayerList playerList;
-@@ -454,24 +455,7 @@ public final class CraftServer implements Server {
+@@ -455,24 +456,7 @@ public final class CraftServer implements Server {
}
public void loadPlugins() {
@@ -7296,7 +7296,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
}
public void enablePlugins(PluginLoadOrder type) {
-@@ -560,15 +544,17 @@ public final class CraftServer implements Server {
+@@ -561,15 +545,17 @@ public final class CraftServer implements Server {
private void enablePlugin(Plugin plugin) {
try {
List<Permission> perms = plugin.getDescription().getPermissions();
@@ -7320,7 +7320,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
this.pluginManager.enablePlugin(plugin);
} catch (Throwable ex) {
-@@ -1010,6 +996,7 @@ public final class CraftServer implements Server {
+@@ -1012,6 +998,7 @@ public final class CraftServer implements Server {
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
));
}
@@ -7329,10 +7329,10 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 5a89b9ca6a62f0bfb5fe01ed4097870788cf5d83..a6de88625aeb2c5ababd476e804e9b45b1185efe 100644
+index 655ceaa92b9979fe29725f9812507731bb0bb484..a339a0aa6fd7cc7be810e93bc9eb192437519c75 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -395,6 +395,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -401,6 +401,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
}
@@ -7524,20 +7524,22 @@ index 0000000000000000000000000000000000000000..1d14f530ef888102e47eeeaf0d1a6076
+}
diff --git a/src/test/java/io/papermc/paper/plugin/PluginDependencyValidationTest.java b/src/test/java/io/papermc/paper/plugin/PluginDependencyValidationTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..83b1274ba56f03bec6cb69a35f33dc04f008cc1e
+index 0000000000000000000000000000000000000000..f4c6b799d80ea555b41396c4a8fd1e02f9197709
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/PluginDependencyValidationTest.java
-@@ -0,0 +1,60 @@
+@@ -0,0 +1,62 @@
+package io.papermc.paper.plugin;
+
+import io.papermc.paper.plugin.entrypoint.dependency.MetaDependencyTree;
+import io.papermc.paper.plugin.entrypoint.dependency.SimpleMetaDependencyTree;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+
++@Normal
+public class PluginDependencyValidationTest {
+
+ private static final TestPluginMeta MAIN;
@@ -7590,10 +7592,10 @@ index 0000000000000000000000000000000000000000..83b1274ba56f03bec6cb69a35f33dc04
+}
diff --git a/src/test/java/io/papermc/paper/plugin/PluginLoadOrderTest.java b/src/test/java/io/papermc/paper/plugin/PluginLoadOrderTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08f4e5d288
+index 0000000000000000000000000000000000000000..caa6d514d2ffa2505e804878678d745b689e214d
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/PluginLoadOrderTest.java
-@@ -0,0 +1,148 @@
+@@ -0,0 +1,150 @@
+package io.papermc.paper.plugin;
+
+import com.google.common.graph.GraphBuilder;
@@ -7602,6 +7604,7 @@ index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08
+import io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy;
+import io.papermc.paper.plugin.entrypoint.strategy.ProviderConfiguration;
+import io.papermc.paper.plugin.provider.PluginProvider;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
@@ -7612,6 +7615,7 @@ index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
++@Normal
+public class PluginLoadOrderTest {
+
+ private static List<PluginProvider<PaperTestPlugin>> REGISTERED_PROVIDERS = new ArrayList<>();
@@ -7744,24 +7748,27 @@ index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08
+}
diff --git a/src/test/java/io/papermc/paper/plugin/PluginManagerTest.java b/src/test/java/io/papermc/paper/plugin/PluginManagerTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..b7d69dda2b88218221a3cca6db4445cb58aa0179
+index 0000000000000000000000000000000000000000..3052b32905c8102357b7b3a5ed2df103fea83ab8
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/PluginManagerTest.java
-@@ -0,0 +1,75 @@
+@@ -0,0 +1,78 @@
+package io.papermc.paper.plugin;
+
+import org.bukkit.Bukkit;
+import org.bukkit.event.Event;
+import org.bukkit.permissions.Permission;
+import org.bukkit.plugin.PluginManager;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
-+import static org.hamcrest.Matchers.*;
++import static org.hamcrest.Matchers.empty;
++import static org.hamcrest.Matchers.is;
++import static org.hamcrest.Matchers.nullValue;
+
-+public class PluginManagerTest extends AbstractTestingBase {
++@Normal
++public class PluginManagerTest {
+
+ private static final PluginManager pm = Bukkit.getPluginManager();
+
@@ -7825,16 +7832,18 @@ index 0000000000000000000000000000000000000000..b7d69dda2b88218221a3cca6db4445cb
+}
diff --git a/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java b/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..6c3be5b84ae245652261668a52ce49934ef200a9
+index 0000000000000000000000000000000000000000..9f4486f736bad41a6c8c9c86e57226a45ae29a61
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,30 @@
+package io.papermc.paper.plugin;
+
+import io.papermc.paper.plugin.provider.configuration.PaperPluginMeta;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
++@Normal
+public class PluginNamingTest {
+ private static final String TEST_NAME = "Test_Plugin";
+ private static final String TEST_VERSION = "1.0";
@@ -7859,10 +7868,10 @@ index 0000000000000000000000000000000000000000..6c3be5b84ae245652261668a52ce4993
+}
diff --git a/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java b/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..2a7408ed5d9a415333212cadd7fefcd03785afbf
+index 0000000000000000000000000000000000000000..0b7f1521f8bf4b18dfdf9403862b5dc6b394a4d9
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java
-@@ -0,0 +1,42 @@
+@@ -0,0 +1,44 @@
+package io.papermc.paper.plugin;
+
+import io.papermc.paper.plugin.manager.PaperPluginManagerImpl;
@@ -7870,9 +7879,11 @@ index 0000000000000000000000000000000000000000..2a7408ed5d9a415333212cadd7fefcd0
+import org.bukkit.event.Event;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.Listener;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
++@Normal
+public class SyntheticEventTest {
+
+ @Test
@@ -8142,16 +8153,16 @@ index 0000000000000000000000000000000000000000..ba271c35eb2804f94cfc893bf94affb9
+ return "null";
+ }
+}
-diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
-index 183d30e3d3d413b05c762f374a964498d6ffdec4..bfbd80b60ac5df500d03c80de57e38aa7548dd46 100644
---- a/src/test/java/org/bukkit/support/DummyServer.java
-+++ b/src/test/java/org/bukkit/support/DummyServer.java
-@@ -103,7 +103,7 @@ public final class DummyServer {
- final Thread currentThread = Thread.currentThread();
- when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
-
-- final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
-+ final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance), null);
- when(instance.getPluginManager()).thenReturn(pluginManager);
- // paper end - testing additions
+diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
+index ba0a2ab9de34fa40dd90cecaeec4a5e54fe3e2d8..5d24b95e3eec351ec1e9444533dd5f9d376ec4c6 100644
+--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
++++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
+@@ -87,7 +87,7 @@ public final class DummyServerHelper {
+ // Paper start - testing additions
+ final Thread currentThread = Thread.currentThread();
+ when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
+- final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
++ final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance), null);
+ when(instance.getPluginManager()).thenReturn(pluginManager);
+ // Paper end - testing additions