Updated Upstream (Bukkit/CraftBukkit) (#11501)
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: bb4e97c6 Add support for Java 23 bc6874dd Bump asm to 9.7.1 50e8a00b PR-1064: Add specific getTopInventory methods for InventoryView derivatives 758b0a0f SPIGOT-7911: Fix Location#isWorldLoaded() for re-loaded worlds 133a64a7 Improve Registry#getOrThrow messages be0f5957 PR-1058: Add tests for Minecraft registry <-> Bukkit fields d1b31df2 PR-1062: Clarify BeaconView documentation 3fab4384 PR-1060: Cache Material to BlockType and ItemType conversion 967a7301 SPIGOT-7906: Increase YAML nesting limit to 100 6ecf033d SPIGOT-7899: Smithing recipes don't require inputs CraftBukkit Changes: 0a7bd6c81 PR-1493: Improve reroute performance and add some tests 54941524c Add support for Java 23 f4d957fff SPIGOT-7915: Fix World#getKeepSpawnInMemory() using Spawn Radius rather than Spawn Chunk Radius ded183674 Fix HIDE_ENCHANTS flag in items without enchantments 308785a0a Bump asm to 9.7.1 and re-add ClassReader to ClassWriter 72ce823cd PR-1487: Add specific getTopInventory methods for InventoryView derivatives 11a5e840c SPIGOT-7907, PR-1484: Improve merchant recipe item matching behavior to more closely align with older versions 45b66f7e4 SPIGOT-7909: Always set HIDE_ENCHANTS flag to item if flag is set 963459791 Increase outdated build delay fc5b2d75f SPIGOT-7910: Fix launching breeze wind charge from API and improve dispenser launch API c7d6428f2 SPIGOT-7856, PR-1483: End platform not dropping items after replacing blocks 2a5572b52 SPIGOT-7780, PR-1482: Cannot edit chunks during unload event 527041ab5 SPIGOT-7902, PR-1477: Fix CraftMetaPotion#hasCustomEffects() does not check if customEffects (List) is empty 5529a1769 Implement base methods for tags 30fbdbaaf Improve Registry#getOrThrow messages 6b71a7322 PR-1475: Add tests for Minecraft registry <-> Bukkit fields 5f24c255c SPIGOT-7908: Mark junit-platform-suite-engine as test scope e4c92ef65 PR-1473: Change tests to use suites, to run tests in different environments and feature flags d25e1e722 PR-1481: Fix BeaconView#set[X]Effect(null) d69a05362 PR-1480: Fix PerMaterialTest#isEdible test running for legacy materials bb3284a89 PR-1479: Use custom #isBlock method in legacy init instead of the one in Material, since it relies on legacy being init 98c57cbbe SPIGOT-7904: Fix NPE for PlayerItemBreakEvent f35bae9ec Fix missing hasJukeboxPlayable 8a6f8b6d8 SPIGOT-7881: CTRL+Pick Block saves position data into item 7913b3be7 SPIGOT-7899: Smithing recipes don't require inputs
This commit is contained in:
parent
755a7753af
commit
3b9db2b194
212 changed files with 1502 additions and 1329 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue