geforkt von Mirrors/Paper
26 Zeilen
1.3 KiB
Diff
26 Zeilen
1.3 KiB
Diff
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
|
|
index 27646d963bd1158f3fe0a9c0593a312404f0e7b0..128113e64731be9c0a4008ffb0a1eae78e221c47 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
|
@@ -434,6 +434,12 @@ public class Commodore
|
|
{
|
|
desc = getOriginalOrRewrite(desc);
|
|
}
|
|
+ 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 )
|