Solved PacketPlayOutMapChunk

Discussion in 'Spigot Plugin Development' started by chochoco4777, Jun 12, 2021.

Thread Status:
Not open for further replies.
  1. Console Issue
    Code (Text):
    [12:44:30] [Server thread/WARN]: java.lang.NoSuchMethodException: net.minecraft.network.protocol.game.PacketPlayOutMapChunk.<init>(org.bukkit.Chunk,int)
    [12:44:31] [Server thread/WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.executeAll(SourceFile:110)
    Code
    BBPlotOptions
    Code (Text):
    ReflectionUtils.sendPacket(p, ReflectionUtils.getChunkNMSClass("PacketPlayOutMapChunk").getConstructor(ReflectionUtils.getBukkitChunkNMSClass("Chunk")).newInstance(c.getClass().getMethod("getHandle").invoke(c)));
    ReflectionUtils
    Code (Text):
        public static Class<?> getChunkNMSClass(String name) {
            try {
                return Class.forName("net.minecraft.network.protocol.game." + name);
            }
            catch (ClassNotFoundException e) {
                e.printStackTrace();
            }
            return null;
        }

        public static Class<?> getBukkitChunkNMSClass(String name) {
            try {
                return Class.forName("org.bukkit." + name);
            }
            catch (ClassNotFoundException e) {

    Whats wrong?
                e.printStackTrace();
            }
            return null;
        }
     
    #1 chochoco4777, Jun 12, 2021
    Last edited: Jun 12, 2021
  2. Full console log
    Code (Text):
    [13:12:46] [Server thread/WARN]: java.lang.NoSuchMethodException: net.minecraft.network.protocol.game.PacketPlayOutMapChunk.<init>(org.bukkit.Chunk)
    [13:12:46] [Server thread/WARN]:        at java.base/java.lang.Class.getConstructor0(Class.java:3517)
    [13:12:46] [Server thread/WARN]:        at java.base/java.lang.Class.getConstructor(Class.java:2238)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1030)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:307)
    [13:12:46] [Server thread/WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)
    [13:12:46] [Server thread/WARN]: java.lang.NoSuchMethodException: net.minecraft.network.protocol.game.PacketPlayOutMapChunk.<init>(org.bukkit.Chunk)
    [13:12:46] [Server thread/WARN]:        at java.base/java.lang.Class.getConstructor0(Class.java:3517)
    [13:12:46] [Server thread/WARN]:        at java.base/java.lang.Class.getConstructor(Class.java:2238)
    [13:12:46] [Server thread/WARN]:        at me.drawethree.buildbattle.objects.plot.BBPlotOptions.lambda$null$3(BBPlotOptions.java:121)
    [13:12:46] [Server thread/WARN]:        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    [13:12:46] [Server thread/WARN]:        at me.drawethree.buildbattle.objects.plot.BBPlotOptions.lambda$setCurrentBiome$4(BBPlotOptions.java:118)
    [13:12:46] [Server thread/WARN]:        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    [13:12:46] [Server thread/WARN]:        at me.drawethree.buildbattle.objects.plot.BBPlotOptions.setCurrentBiome(BBPlotOptions.java:117)
    [13:12:46] [Server thread/WARN]:        at me.drawethree.buildbattle.listeners.PlayerListener.onClick(PlayerListener.java:441)
    [13:12:46] [Server thread/WARN]:        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [13:12:46] [Server thread/WARN]:        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
    [13:12:46] [Server thread/WARN]:        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [13:12:46] [Server thread/WARN]:        at java.base/java.lang.reflect.Method.invoke(Method.java:567)
    [13:12:46] [Server thread/WARN]:        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306)
    [13:12:46] [Server thread/WARN]:        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
    [13:12:46] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589)
    [13:12:46] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2437)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(SourceFile:50)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(SourceFile:11)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:30)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.server.TickTask.run(SourceFile:18)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.executeTask(SourceFile:151)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.executeNext(SourceFile:125)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.bg(MinecraftServer.java:1124)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.executeNext(MinecraftServer.java:1117)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.util.thread.IAsyncTaskHandler.executeAll(SourceFile:110)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.sleepForTick(MinecraftServer.java:1100)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1030)
    [13:12:46] [Server thread/WARN]:        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:307)
    [13:12:46] [Server thread/WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)
     
Thread Status:
Not open for further replies.