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 #132

Open
Tuchan opened this issue Feb 23, 2024 · 0 comments
Open

ZNPCsPlus player head hologram breaks interaction with NPC's #132

Tuchan opened this issue Feb 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Tuchan
Copy link

Tuchan commented Feb 23, 2024

After I installed the Quests plugin, whenever I clicked on an NPC with a player head in its hologram, I received this error message:

[ERROR]: Could not pass event NpcInteractEvent to Quests v3.15-f7de2dc
java.lang.IllegalStateException: Failed to convert NBT to JSON.
Full 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]

After reporting this issue to the Quests team, it seems ZNPCsPlus fails while trying to serialize the hologram.

Steps to Reproduce (with Quests installed)

  • 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)
@Pyrbu Pyrbu added the bug Something isn't working label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants