Fix CraftbukkitWrapper for FightSystem

This commit is contained in:
2026-05-15 16:00:50 +02:00
parent 81049856b5
commit 01db4fa951
@@ -41,8 +41,8 @@ public class CraftbukkitWrapper {
public static final CraftbukkitWrapper impl = new CraftbukkitWrapper(); public static final CraftbukkitWrapper impl = new CraftbukkitWrapper();
private static final Reflection.Method getWorld = Reflection.getMethod(Reflection.getClass("org.bukkit.craftbukkit.CraftWorld"), "getHandle"); private static final Reflection.Method getWorld = Reflection.getMethod(Reflection.getClass("org.bukkit.craftbukkit.CraftWorld"), "getHandle");
private static final Reflection.Method getChunk = Reflection.getTypedMethod(ServerLevel.class, null, Chunk.class, int.class, int.class); private static final Reflection.Method getChunk = Reflection.getTypedMethod(ServerLevel.class, null, LevelChunk.class, int.class, int.class);
private static final Reflection.Method getChunkSections = Reflection.getTypedMethod(Chunk.class, null, LevelChunkSection[].class); private static final Reflection.Method getChunkSections = Reflection.getTypedMethod(LevelChunk.class, null, LevelChunkSection[].class);
private LevelChunkSection[] getChunkSections(World world, int x, int z) { private LevelChunkSection[] getChunkSections(World world, int x, int z) {
return (LevelChunkSection[]) getChunkSections.invoke(getChunk.invoke(getWorld.invoke(world), x, z)); return (LevelChunkSection[]) getChunkSections.invoke(getChunk.invoke(getWorld.invoke(world), x, z));
} }