aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0853-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
diff options
context:
space:
mode:
authorTamion <[email protected]>2023-11-04 21:20:13 +0100
committerGitHub <[email protected]>2023-11-04 13:20:13 -0700
commitbffb08c2f99a5527b7357d005cb10ba21cf048d9 (patch)
treec25ad5490b0ede8ce30bc0f23b5e0255eecc0dbc /patches/server/0853-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
parent6592fed511ee2ea17de9e05463579bd1923cf8aa (diff)
downloadPaper-bffb08c2f99a5527b7357d005cb10ba21cf048d9.tar.gz
Paper-bffb08c2f99a5527b7357d005cb10ba21cf048d9.zip
Deprecate Player#boostElytra (#9899)
The Paper method was chosen for deprecation because it was more restrictive in that it has an isGliding check.
Diffstat (limited to 'patches/server/0853-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch')
-rw-r--r--patches/server/0853-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/server/0853-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0853-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
new file mode 100644
index 0000000000..764d46a061
--- /dev/null
+++ b/patches/server/0853-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
@@ -0,0 +1,25 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+Date: Mon, 19 Sep 2022 00:13:02 +0100
+Subject: [PATCH] Mitigate effects of WorldCreator#keepSpawnLoaded ret type
+ change
+
+TODO: Remove in 1.21?
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+index 1f30da05f0dd1d0f67ff7ec544e8f8455e2ef516..6f752084919ec1329d46b61b9d5f84656c9d9921 100644
+--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
++++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+@@ -460,6 +460,12 @@ public class Commodore
+ super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CB_PACKAGE + "/advancement/CraftAdvancement", "getDisplay0", desc, false);
+ return;
+ }
++ if (owner.equals("org/bukkit/WorldCreator") && name.equals("keepSpawnLoaded") && desc.equals("(Lnet/kyori/adventure/util/TriState;)V")) {
++ super.visitMethodInsn(opcode, owner, name, "(Lnet/kyori/adventure/util/TriState;)Lorg/bukkit/WorldCreator;", itf);
++ // new method has a return, so, make sure we pop it
++ super.visitInsn(Opcodes.POP);
++ return;
++ }
+ // Paper end
+
+ // Paper start - ItemFactory#getSpawnEgg (paper had original method that returned ItemStack, upstream added identical but returned Material)