1.7.10 ProtocolLib Utility Error

Discussion in 'Spigot Plugin Development' started by mrkino99, Mar 27, 2020.

  1. Im getting this error while making an hcf core
    java.lang.ExceptionInInitializerError
    at com.kino.hcf.visualise.VisualiseUtil.sendBulk(VisualiseUtil.java:53) ~[?:?]
    at com.kino.hcf.visualise.VisualiseUtil.handleBlockChanges(VisualiseUtil.java:42) ~[?:?]
    at com.kino.hcf.visualise.VisualiseHandler.generate(VisualiseHandler.java:109) ~[?:?]
    at com.kino.hcf.faction.claim.ClaimWandListener$2.run(ClaimWandListener.java:174) ~[?:?]
    at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71)
    and this
    Caused by: java.lang.RuntimeException: Unable to find MultiBlockChangeInfo (PacketPlayOutMultiBlockChange$MultiBlockChangeInfo)
    at com.comphenix.protocol.utility.MinecraftReflection.getMinecraftClass(MinecraftReflection.java:1996) ~[?:?]
    at com.comphenix.protocol.utility.MinecraftReflection.getMultiBlockChangeInfoClass(MinecraftReflection.java:1764) ~[?:?]
    at com.comphenix.protocol.wrappers.MultiBlockChangeInfo.<clinit>(MultiBlockChangeInfo.java:38) ~[?:?]
    ... 11 more

    and my code is this:
    Code (Java):
    private static void sendBulk(Player player, org.bukkit.Chunk chunk, Map<Location, MaterialData> input) {
            MultiBlockChangeInfo[] blockChangeInfo = new MultiBlockChangeInfo[input.size()];
            int i = 0;
            for (Map.Entry<Location, MaterialData> entry : input.entrySet()) {
                MaterialData data = entry.getValue();
                i++;
                try {
                    blockChangeInfo[i] = new MultiBlockChangeInfo(entry.getKey(), WrappedBlockData.createData(data.getItemType()));
                }catch (Throwable t){
                    Bukkit.getServer().getLogger().warning("Failure during static initialization");
                    throw t;
                }
            }
            WrapperPlayServerMultiBlockChange packet = new WrapperPlayServerMultiBlockChange();
            packet.setChunk(new com.comphenix.protocol.wrappers.ChunkCoordIntPair(chunk.getX(), chunk.getZ()));
            packet.setRecords(blockChangeInfo);
            packet.sendPacket(player);
        }
    could be because im using Spigot and not Paper? (if it is because of this i will close the thread)