forked from SteamWar/SteamWar
Fix CraftbukkitWrapper for FightSystem
This commit is contained in:
+2
-2
@@ -41,8 +41,8 @@ public class 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 getChunk = Reflection.getTypedMethod(ServerLevel.class, null, Chunk.class, int.class, int.class);
|
||||
private static final Reflection.Method getChunkSections = Reflection.getTypedMethod(Chunk.class, null, LevelChunkSection[].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(LevelChunk.class, null, LevelChunkSection[].class);
|
||||
private LevelChunkSection[] getChunkSections(World world, int x, int z) {
|
||||
return (LevelChunkSection[]) getChunkSections.invoke(getChunk.invoke(getWorld.invoke(world), x, z));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user