ProtocolLib

3M Downloads

Error when using (Paper)spigot 1.16.3

ShioDEV opened this issue ยท 2 comments

commented

[16.09 02:12:37.194] INFO: [Lobby-1] com.comphenix.protocol.reflect.FieldAccessException: No field with type net.minecraft.server.v1_16_R2.ItemStack exists in class PacketPlayOutEntityEquipment.
[16.09 02:12:37.194] INFO: [Lobby-1] at com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:363) ~[?:?]
[16.09 02:12:37.194] INFO: [Lobby-1] at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:343) ~[?:?]
[16.09 02:12:37.194] INFO: [Lobby-1] at com.github.juliarn.npc.modifier.EquipmentModifier.queue(EquipmentModifier.java:21) ~[?:?]
[16.09 02:12:37.194] INFO: [Lobby-1] at eu.cloudnetservice.cloudnet.ext.npcs.bukkit.BukkitNPCManagement.lambda$createNPC$11(BukkitNPCManagement.java:235) ~[?:?]
[16.09 02:12:37.194] INFO: [Lobby-1] at com.github.juliarn.npc.NPC.lambda$show$1(NPC.java:53) ~[?:?]
[16.09 02:12:37.194] INFO: [Lobby-1] at org.bukkit.craftbukkit.v1_16_R2.scheduler.CraftTask.run(CraftTask.java:99) ~[paper.jar:git-Paper-195]
[16.09 02:12:37.194] INFO: [Lobby-1] at org.bukkit.craftbukkit.v1_16_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:468) ~[paper.jar:git-Paper-195]
[16.09 02:12:37.194] INFO: [Lobby-1] at net.minecraft.server.v1_16_R2.MinecraftServer.b(MinecraftServer.java:1296) ~[paper.jar:git-Paper-195]
[16.09 02:12:37.194] INFO: [Lobby-1] at net.minecraft.server.v1_16_R2.DedicatedServer.b(DedicatedServer.java:371) ~[paper.jar:git-Paper-195]
[16.09 02:12:37.194] INFO: [Lobby-1] at net.minecraft.server.v1_16_R2.MinecraftServer.a(MinecraftServer.java:1211) ~[paper.jar:git-Paper-195]
[16.09 02:12:37.194] INFO: [Lobby-1] at net.minecraft.server.v1_16_R2.MinecraftServer.w(MinecraftServer.java:999) ~[paper.jar:git-Paper-195]
[16.09 02:12:37.194] INFO: [Lobby-1] at net.minecraft.server.v1_16_R2.MinecraftServer.lambda$a$0(MinecraftServer.java:177) ~[paper.jar:git-Paper-195]
[16.09 02:12:37.194] INFO: [Lobby-1] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242]

commented

I'm not sure since you didn't provide any codes, but I guess the plugin does not support the 1.16 update yet.
Since 1.16, instead of Itemstack - Slot method, the PacketPlayOutEntityEquipment packet requires List of Pairs.

You can see the difference here: https://wiki.vg/Pre-release_protocol#Entity_Equipment

for the actual solution, here is noonmaru's tap repository, using EntityEquipment packet.
v1_15_R1: https://github.com/noonmaru/tap/blob/master/v1_15_R1/src/main/kotlin/com/github/noonmaru/tap/v1_15_R1/protocol/NMSPacketSupport.kt#L101-L110
v1_16_R2: https://github.com/noonmaru/tap/blob/master/v1_16_R2/src/main/kotlin/com/github/noonmaru/tap/v1_16_R2/protocol/NMSPacketSupport.kt#L102-L113

commented

I made a pull request with an updated wrapper: dmulloy2/PacketWrapper#78