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
152 stars 108 forks source link

When creating a new quest and assigning it to an NPC, Gui does not open. #1936

Closed TheBlockForge closed 2 years ago

TheBlockForge commented 2 years ago

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

4.4.0

Describe the problem and how to replicate it.

I edited an existing quest and changed the NPC it was assigned to (I also created a new one and had the same issues) and even after assigning a GUI item, It doesn't open the GUI as normal.

Any console errors to share?

None that I've noticed

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

custom1:
    name: Shopping Spree!
    ask-message: accept this quest and travel to the shopping district!
    finish-message: Well done! Feel free to visit the shopping district at any time
      and even open your own shop!
    npc-giver-uuid: c595e3dc-8490-4506-9e58-c73b1f3ee9c2
    gui-display:
      ==: org.bukkit.inventory.ItemStack
      v: 2975
      type: EMERALD
    stages:
      ordered:
        '1':
          npc-uuids-to-talk-to:
          - 00b005e5-c2e2-4715-8a9a-c20c64930786
        '2':
          password-displays:
          - Visit each shop and look for the emeralds in the item frames. unscramble
            the letters to discover the 4 letter password
          password-phrases:
          - shop
          start-message: To complete the second stage of this quest, visit each shop
            and look for clues to uncover the password!
    rewards:
      commands:
      - token add <player> 200
    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
PikaMug commented 2 years ago

Thanks for the report. Are there any other quests attached to the NPC (and do they have GUI items set), or is it just the one?

hkkongou commented 2 years ago

same problem here, it apply to all quests i have the GUI item set and npc giver I have tested with quests gui and without quests gui (quests original build in one), both showing nothing. I am afraid to update quests to latest versions

not sure when did the npc giver npc id became npc-giver-uuid, maybe the problem appears after this update, need to test test (actually i am not sure why need to have npc-giver-uuid instead of npc-id , keeping npc id can ensure yml quests maker to make outside of game without knowing the npc uuid

TheBlockForge commented 2 years ago

Thanks for the report. Are there any other quests attached to the NPC (and do they have GUI items set), or is it just the one?

Tried replying in email but not usre it worked so replying here again.

Yes, multiple quest and im in the process of adding even more. each quest has a specicif gui item. before the latest update the gui would open no problem and i could select from a couple quests.

cerus commented 2 years ago

Hey @TheBlockForge and @hkkongou, would you be able to send your Citizens/saves.yml and Quests/quests.yml files (preferably using something like pastebin)?

TheBlockForge commented 2 years ago

Link to Saves.yml: https://pastebin.com/HKK0LPAx Link to quests.yml: https://pastebin.com/1qGfE3FC

Let me know if there is anything else I can do to help

cerus commented 2 years ago

Link to Saves.yml: https://pastebin.com/HKK0LPAx Link to quests.yml: https://pastebin.com/1qGfE3FC

Let me know if there is anything else I can do to help

Thanks! I'm going to bed now so I'll take a look in a few hours after work.

TheBlockForge commented 2 years ago

Link to Saves.yml: https://pastebin.com/HKK0LPAx Link to quests.yml: https://pastebin.com/1qGfE3FC Let me know if there is anything else I can do to help

Thanks! I'm going to bed now so I'll take a look in a few hours after work.

Awesome. Thanks guys. Really impressed with the quick responses and dedication you guys have with this plug in!

cerus commented 2 years ago

@TheBlockForge I've tried to reproduce the issue with your NPC and Quest configurations but everything seems to work as intended. What other plugins are you using on your Server? What server software (Paper, Spigot, Purpur, ..) and what version are you running? Is it possible for you to record a video that shows the issue?

In addition to that a server log would be useful. Please restart your server and try to open the gui. After doing that upload the logs/latest.log file to pastebin and send the link here. (Don't forget to censor any IPs)

TheBlockForge commented 2 years ago

Ill see what I can do. Bear with me because im new to all this kind of stuff.

TheBlockForge commented 2 years ago

2022-04-28_06 51 16 here are my plug ins. My best suspicions as far as plug in conflicts would be tokens plus. its a shitty currency plug in we implemented because i don't know what I'm doing too well yet and it was very easy to set up and implement.

Currently running paper, going to run updates this evening and get the latest version, but im not too far behind the current build. ITs a small server, just a handful fo friends mostly, so it should be empty this evening where i can do some testing on my end with a binary search of the plugins to determine if it is indeed a conflict

TheBlockForge commented 2 years ago

Ive been able to upload a video to youtube because i didnt know how else to do it lol

https://youtu.be/THCRdW-DT7o

Ill do a restart and send the logs this evening

PikaMug commented 2 years ago

I was finally able to replicate this on a fresh Paper 1.16.5 server. Steps as follows:

Paper https://papermc.io/api/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar Quests https://ci.codemc.io/job/PikaMug/job/Quests/327/ Citizens https://ci.citizensnpcs.co/job/Citizens2/2505/ Only other plugins EssentialsX-2.19.1-dev+52-41861a8 and EssentialsXSpawn-2.19.1-dev+52-41861a8

Use /quests editor and add Start NPC to default Mob Hunter quest, save and run /qa reload. Clicking NPC does nothing. Going back and adding a GUI item display to the quest has no effect and does not open a GUI.

cerus commented 2 years ago

I was finally able to replicate this on a fresh Paper 1.16.5 server. Steps as follows:

Paper https://papermc.io/api/v2/projects/paper/versions/1.16.5/builds/794/downloads/paper-1.16.5-794.jar Quests https://ci.codemc.io/job/PikaMug/job/Quests/327/ Citizens https://ci.citizensnpcs.co/job/Citizens2/2505/ Only other plugins EssentialsX-2.19.1-dev+52-41861a8 and EssentialsXSpawn-2.19.1-dev+52-41861a8

Use /quests editor and add Start NPC to default Mob Hunter quest, save and run /qa reload. Clicking NPC does nothing. Going back and adding a GUI item display to the quest has no effect and does not open a GUI.

Just tried that and everything works as intended :D This is quite an interesting bug.

TheBlockForge commented 2 years ago

Nice! progress is good to hear. let me know if theres anything else i can do

PikaMug commented 2 years ago

@hkkongou @TheBlockForge Does deleting the QuestsGUI/gui folder to allow it to regenerate resolve the issue?

Unfortunately I had to restart my server and the issue stopped occurring. I'm at a loss.

TheBlockForge commented 2 years ago

it does not seem to.

PikaMug commented 2 years ago

In your Quests/config.yml file, go ahead and set console-logging: 4. Then try https://ci.codemc.io/job/PikaMug/job/Quests/328/ and share all of the DEBUG information you get in the server console after clicking an NPC.

TheBlockForge commented 2 years ago

This build seemed to fix the issue. no debug info in the console3, and the gui is working again!!

PikaMug commented 2 years ago

Weird. The only change was adding debug output, which should certainly appear. Truly confounding.

Glad it's working for you, hopefully @hkkongou has similar luck.

TheBlockForge commented 2 years ago

@PikaMug uninstalling and reinstalling; the equivalent of turning it on and off again. A simple fix that should have been something i tried earlier!

Thank you for all of the help. this is the first and only plug in that ive had issues with that came with this level of customer service. 10/10!

Ill be in touch if the issue reoccurs.

hkkongou commented 2 years ago

Weird. The only change was adding debug output, which should certainly appear. Truly confounding.

Glad it's working for you, hopefully @hkkongou has similar luck.

can confirm # 440 have no problem

PikaMug commented 2 years ago

I guess this is resolved then. Thanks all.

TheBlockForge commented 2 years ago

@PikaMug Thank you guys for responding and helping! 10/10 would report bugs again

TheBlockForge commented 2 years ago

@PikaMug Issue occured again with a different NPC. I backed up quests.yml and deleted the quests folder and jar and reinstalled it, allowed the quests folder to regenerate and then added my quests.yml file and it resolved the issue again. seems to occur after adding multiple quests to an NPC back to back.

PikaMug commented 2 years ago

Still unable to replicate. At this point I'm going to need exact steps on how to recreate this reliably. If you or anyone should across them, feel free to open a new ticket.