Citizens Deliver not taking items
Description of Bug
I'm running a Paper 1.8.8 server with your Quest plugin version Quests v3.15.2-5cb159b.
I have a citizens deliver quest which correctly registers items delivered when clicking the NPC, but the items are not removed from the player's inventory.
This is my quest:
tasks: GuardLevel1_2: type: "citizens_deliver" npc-name: "Warden" item: BREAD amount: 128 remove-items-when-complete: true allow-partial-completion: true display: name: "&6Guard Level 1 - Part 2" lore-normal: - "" - "&7◆ Task:" - "&7◆ Deliver &a128 bread to Warden NPC" - "" lore-started: - "" - "&a◆ Status:" - "&a◆ {GuardLevel1_2:progress}/128" type: "BREAD"
options: category: GuardLevels repeatable: false requires: - "GuardLevel1-1" sort-order: 2
Steps to Reproduce
Setup a server with the above versions and try to deliver an item to a citizens NPC.
Environment
- Minecraft version: PaperSpigot-445 (MC: 1.8.8)
- Quests version: Quests v3.15.2-5cb159b
Agreements
- [x] I am running the latest version of Quests
- [x] I am certain this issue is unique and a similar issue is not currently open
- [x] I am using a version of Minecraft which is supported by Quests
Other
No response
What Citizens version should I get to test this lol
Okay so, I managed to reproduce it and the cause is the way this method works in https://github.com/LMBishop/Quests/blob/a4857f7a4e457ff4c7c7e8da8410129efd4aabcf/bukkit/src/main/java/com/leonardobishop/quests/bukkit/util/TaskUtils.java#L598-L611 but I didn't manage to make it work in both latest versions and 1.8 at the same time.
Also managed to find that, it (maybe?) worked in an ancient version (from 4 years ago) in this way: https://github.com/LMBishop/Quests/blob/a835e7b48765f3b3fe1bc1c35adff0e867181e91/bukkit/src/main/java/com/leonardobishop/quests/bukkit/tasktype/type/InventoryTaskType.java#L85-L166
It affects inventory task type too, which makes the reproduction easier. It's broken on 1.9.4 as well. We need to find the version which made the current solution work, so I can find out how to fix it.
It seems to have changed between 1.10.2 and 1.11.2. On 1.11.2 it works properly, but on 1.10.2 it doesn't remove the items.
@Krakenied It works now ;-) Thanks!