PikaMug / Quests

Easy-to-use, open-source plugin for the creation and execution of quests on Minecraft servers.
https://modrinth.com/plugin/quests.classic
MIT License
141 stars 104 forks source link

NPC with multiple quests - GUI error #2119

Closed MWatts232 closed 1 year ago

MWatts232 commented 1 year ago

What is your Quests version / build number (do not say "latest")?

quests :4.8.2 and QuestsGUI : 0.53

Describe the problem and how to replicate it.

when an npc has more than one quest assigned to it, the right click interact does not work and it throws an error log in console. Both quests are basic kill quests it worked previously on older versions.

Any console errors to share?

[17:16:22] [Server thread/INFO]: Completing queue 'KILL_QUESTS_0_FavoritesBallet' in 2166ms.
[17:16:26] [Server thread/ERROR]: Could not pass event QuesterPreOpenGUIEvent to QuestsGUI v0.53
org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at me.blackvein.quests.Quester.showGUIDisplay(Quester.java:4846) ~[?:?]
        at me.blackvein.quests.listeners.CitizensListener.onNPCRightClick(CitizensListener.java:254) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at net.citizensnpcs.EventListen.onPlayerInteractEntity(EventListen.java:457) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:589) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:576) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.server.network.PlayerConnection$4.performInteraction(PlayerConnection.java:2427) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.network.PlayerConnection$4.a(PlayerConnection.java:2474) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.network.protocol.game.PacketPlayInUseEntity$d.a(SourceFile:116) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.network.protocol.game.PacketPlayInUseEntity.a(SourceFile:66) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:2416) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.network.protocol.game.PacketPlayInUseEntity.a(SourceFile:53) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.network.protocol.game.PacketPlayInUseEntity.a(SourceFile:13) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:31) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:156) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1154) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:1) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.util.thread.IAsyncTaskHandler.x(SourceFile:130) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.MinecraftServer.bi(MinecraftServer.java:1133) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1126) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:139) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.MinecraftServer.i_(MinecraftServer.java:1110) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1021) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.19.4-R0.1-SNAPSHOT.jar:3763-Spigot-7d7b241-5a5e43e]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NoSuchMethodError: 'java.lang.String me.blackvein.quests.Dependencies.getNPCName(java.util.UUID)'
        at org.browsit.questsgui.npc.display.DisplayGUI.<init>(DisplayGUI.java:45) ~[?:?]
        at org.browsit.questsgui.listeners.QuesterListener.onQuesterPreOpenGUIEvent(QuesterListener.java:32) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-api-1.19.4-R0.1-SNAPSHOT.jar:?]
        ... 43 more
[17:16:26] [Server thread/INFO]: +- Getting interact script: n@Valkyire/p@_Kaires_ ---------+
[17:16:26] [Server thread/INFO]: +> [InteractScri...] Interact script is KILL_QUESTS. Current step for this script is: 1

If applicable, can you provide an example quest from quests.yml?

custom2:
    name: Kill Zombies
    ask-message: Kill zombies in the surrounding area
    finish-message: Utopia is safer becuase of you !
    npc-giver-uuid: d502c8b6-39f2-4d5a-8d00-a0fc7cf56fa0
    stages:
      ordered:
        '1':
          mobs-to-kill:
          - zombie
          mob-amounts:
          - 25
    rewards:
      money: 10
      exp: 10
  custom3:
    name: Skeleton Hunter
    ask-message: Kill Skeletons
    finish-message: Utopia Grows in glory !
    npc-giver-uuid: d502c8b6-39f2-4d5a-8d00-a0fc7cf56fa0
    stages:
      ordered:
        '1':
          mobs-to-kill:
          - Skeleton
          mob-amounts:
          - 25
    rewards:
      money: 10
      exp: 20
    planner:
      override: false
    options:
      allow-commands: true
      allow-quitting: true
      ignore-silk-touch: true
      use-parties-plugin: true
      share-progress-level: 1
      same-quest-only: true
      share-distance: 0.0
      handle-offline-players: false
      ignore-block-replace: true
PikaMug commented 1 year ago

This appears to be an issue with QuestsGUI, but I'll take it here.

What is the full version number from running /quests info?

JustiinGER commented 1 year ago

Hey, I had the same problem with Quests 4.8.1-b404.

I have now updated to Quests 4.8.2-b416 and that has fixed the problem.

I can't contribute any logs because I didn't get any.

PikaMug commented 1 year ago

I do suspect OP is using an older version of Quests accidentally (perhaps duplicate jars?). Closing until I hear otherwise.

MWatts232 commented 1 year ago

Hey, My quests is on version 4.8.2-b416 The issues somewhat fixed itself when I removed all quests from the npc and added more than 2. However it only shows in text format and doesn't display the GUI. is this a setting i may have disabled ?

PikaMug commented 1 year ago

Hey, My quests is on version 4.8.2-b416 The issues somewhat fixed itself when I removed all quests from the npc and added more than 2. However it only shows in text format and doesn't display the GUI. is this a setting i may have disabled ?

Glad to hear. In order to show an GUI you must set an "item display" on all applicable quests (in addition to setting an NPC).

MWatts232 commented 1 year ago

ok, so the issue appears when They have a GUI display item. Works in text version but as soon as I add the item display it throws up the previous error msg