Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZNPCSPlus player head hologram breaks interaction with NPC's when Quests is installed #618

Closed
3 tasks done
Tuchan opened this issue Feb 23, 2024 · 2 comments · Fixed by #624
Closed
3 tasks done
Labels
bug status: needs investigating Bug report / feature request needs investigating and triage

Comments

@Tuchan
Copy link

Tuchan commented Feb 23, 2024

Description of Bug

Whenever Quests is installed, the interaction breaks if you have an NPC with a custom player head as a hologram.

[ERROR]: Could not pass event NpcInteractEvent to Quests v3.15-f7de2dc
java.lang.IllegalStateException: Failed to convert NBT to JSON.

Steps to Reproduce

  • Install the newest version of ZNPCSPlus and Quests
  • Create an NPC with a simple action (ex: /npc action add message <id> ANY_CLICK 1 0 test)
  • Add a player head item hologram (ex: /npc holo insteritem <id> 0 while holding the player head)
  • Click on the NPC, it should now display an error in the console)

Environment

  • Minecraft version: 1.20.2
  • Server software: Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)
  • Quests version: 3.15-f7de2dc

Agreements

  • I am running the latest version of Quests
  • I am certain this issue is unique and a similar issue is not currently open
  • I am using a version of Minecraft which is supported by Quests

Other

Error message
[15:14:30 ERROR]: Could not pass event NpcInteractEvent to Quests v3.15-f7de2dc
java.lang.IllegalStateException: Failed to convert NBT to JSON.
	at lol.pyr.znpcsplus.libraries.packetevents.api.protocol.nbt.codec.NBTCodec.nbtToJson(NBTCodec.java:145) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.libraries.packetevents.api.protocol.nbt.codec.NBTCodec.nbtToJson(NBTCodec.java:139) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.libraries.packetevents.api.protocol.nbt.codec.NBTCodec.nbtToJson(NBTCodec.java:139) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.hologram.HologramItem.serialize(HologramItem.java:109) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.hologram.HologramImpl.getLine(HologramImpl.java:80) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at com.leonardobishop.quests.bukkit.tasktype.type.dependent.ZNPCsPlusDeliverTaskType.onNpcInteract(ZNPCsPlusDeliverTaskType.java:36) ~[Quests-3.15-f7de2dc.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor116.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:git-Paper-318]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.2.jar:git-Paper-318]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.2.jar:git-Paper-318]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.2-R0.1-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.interaction.InteractionPacketListener.onPacketReceive(InteractionPacketListener.java:46) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.libraries.packetevents.api.event.PacketListener$1.onPacketReceive(PacketListener.java:41) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.libraries.packetevents.api.event.PacketReceiveEvent.call(PacketReceiveEvent.java:45) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.libraries.packetevents.api.event.EventManager.callEvent(EventManager.java:52) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.libraries.packetevents.api.util.PacketEventsImplHelper.handleServerBoundPacket(PacketEventsImplHelper.java:82) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.libraries.packetevents.impl.injector.handlers.PacketEventsDecoder.read(PacketEventsDecoder.java:51) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.libraries.packetevents.impl.injector.handlers.PacketEventsDecoder.decode(PacketEventsDecoder.java:58) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at lol.pyr.znpcsplus.libraries.packetevents.impl.injector.handlers.PacketEventsDecoder.decode(PacketEventsDecoder.java:35) ~[ZNPCsPlus-2.0.0-SNAPSHOT.jar:?]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:333) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:454) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[netty-codec-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[netty-handler-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.handler.flush.FlushConsolidationHandler.channelRead(FlushConsolidationHandler.java:152) ~[netty-handler-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.97.Final.jar:4.1.97.Final]
@Tuchan Tuchan added bug status: needs investigating Bug report / feature request needs investigating and triage labels Feb 23, 2024
@Krakenied
Copy link
Contributor

Krakenied commented Feb 23, 2024

I'm not sure if it's not possibly caused by the ZNPCsPlus plugin - it fails serializing the hologram

@Tuchan
Copy link
Author

Tuchan commented Feb 23, 2024

It worked fine without Quests installed 😭
(at least it didn't display the error message)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status: needs investigating Bug report / feature request needs investigating and triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants