2022-09-20 02:28:22 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
|
|
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
|
2023-04-14 01:52:42 +02:00
|
|
|
index cacd9b59741c31e70e898e7af91a1a6ed3f87f07..2ee82c316c3a6a79e1d722dfd00c22baa83c0299 100644
|
2022-09-20 02:28:22 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
2023-04-14 01:52:42 +02:00
|
|
|
@@ -466,6 +466,12 @@ public class Commodore
|
2022-11-04 23:59:15 +01:00
|
|
|
super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CB_PACKAGE + "/advancement/CraftAdvancement", "getDisplay0", desc, false);
|
|
|
|
return;
|
2022-09-20 02:28:22 +02:00
|
|
|
}
|
|
|
|
+ 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
|
|
|
|
if ( modern )
|
2022-12-20 19:56:33 +01:00
|
|
|
{
|