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

Quest command not working while quest is activated. #2258

Closed Reflect-good closed 3 months ago

Reflect-good commented 4 months ago

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

5.0.6-b491

Describe the problem and how to replicate it.

run /quest command when quest is activated.

Any console errors to share?

[23:18:24 ERROR]: Command exception: /quest
org.bukkit.command.CommandException: Unhandled exception executing command 'quest' in plugin Quests v5.0.6-b491
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.command.brigadier.bukkit.BukkitCommandNode$BukkitBrigCommand.run(BukkitCommandNode.java:91) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at com.mojang.brigadier.context.ContextChain.runExecutable(ContextChain.java:73) ~[brigadier-1.2.9.jar:?]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:30) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.commands.execution.tasks.ExecuteCommand.execute(ExecuteCommand.java:13) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.commands.execution.UnboundEntryAction.lambda$bind$0(UnboundEntryAction.java:8) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.commands.execution.CommandQueueEntry.execute(CommandQueueEntry.java:5) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.commands.execution.ExecutionContext.runCommandQueue(ExecutionContext.java:103) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.commands.Commands.executeCommandInContext(Commands.java:451) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.commands.Commands.performCommand(Commands.java:358) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.commands.Commands.performCommand(Commands.java:345) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.commands.Commands.performCommand(Commands.java:340) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.performUnsignedChatCommand(ServerGamePacketListenerImpl.java:2226) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2503) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at org.bukkit.craftbukkit.entity.CraftPlayer.chat(CraftPlayer.java:760) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at DecentHolograms-2.8.9.jar/eu.decentsoftware.holograms.api.actions.ActionType$3.lambda$execute$0(ActionType.java:71) ~[DecentHolograms-2.8.9.jar:?]
        at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:86) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:475) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1761) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:509) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1633) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1333) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:333) ~[purpur-1.21.jar:1.21-2272-b2d1fea]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.base/java.util.LinkedList.checkElementIndex(LinkedList.java:566) ~[?:?]
        at java.base/java.util.LinkedList.get(LinkedList.java:487) ~[?:?]
        at Quests-5.0.6.jar/me.pikamug.quests.player.BukkitQuester.getCurrentObjectives(BukkitQuester.java:1263) ~[Quests-5.0.6.jar:?]
        at Quests-5.0.6.jar/me.pikamug.quests.player.BukkitQuester.showCurrentObjectives(BukkitQuester.java:1588) ~[Quests-5.0.6.jar:?]
        at Quests-5.0.6.jar/me.pikamug.quests.commands.quest.BukkitQuestCommandHandler.check(BukkitQuestCommandHandler.java:55) ~[Quests-5.0.6.jar:?]
        at Quests-5.0.6.jar/me.pikamug.quests.listeners.BukkitCommandManager.onCommand(BukkitCommandManager.java:49) ~[Quests-5.0.6.jar:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-mojangapi-1.21-R0.1-SNAPSHOT.jar:?]
        ... 23 more

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

# For non-English characters, this file MUST stay encoded in UTF-8
quests:
  '000001':
    name: obsidian
    ask-message: Challenge objectives!
    finish-message: Well done!
    npc-giver-uuid: 4f7b8055-5af4-452c-a78d-09bea8c8657e
    stages:
      ordered:
        '1':
          items-to-deliver:
          - ==: org.bukkit.inventory.ItemStack
            v: 3953
            type: OBSIDIAN
            amount: 64
          - ==: org.bukkit.inventory.ItemStack
            v: 3953
            type: OBSIDIAN
            amount: 64
          - ==: org.bukkit.inventory.ItemStack
            v: 3953
            type: OBSIDIAN
            amount: 64
          npc-delivery-uuids:
          - 4f7b8055-5af4-452c-a78d-09bea8c8657e
          - 4f7b8055-5af4-452c-a78d-09bea8c8657e
          - 4f7b8055-5af4-452c-a78d-09bea8c8657e
          delivery-messages:
          - Thank you. Only §5<amount> §rmore to go!
          - Thank you. Only §5<amount> §rmore to go!
          - Thank you. Only §5<amount> §rmore to go!
        '2':
          break-block-durability: []
          items-to-deliver:
          - ==: org.bukkit.inventory.ItemStack
            v: 3953
            type: CRYING_OBSIDIAN
            amount: 16
          npc-delivery-uuids:
          - 4f7b8055-5af4-452c-a78d-09bea8c8657e
          delivery-messages:
          - Thank you. Only §5<amount> §rmore to go!
        '3':
          items-to-deliver:
          - ==: org.bukkit.inventory.ItemStack
            v: 3953
            type: FLINT_AND_STEEL
            amount: 8
          npc-delivery-uuids:
          - 4f7b8055-5af4-452c-a78d-09bea8c8657e
          delivery-messages:
          - Thank you. Only §5<amount> §rmore to go!
        '4':
          items-to-deliver:
          - ==: org.bukkit.inventory.ItemStack
            v: 3953
            type: CONDUIT
          npc-delivery-uuids:
          - 4f7b8055-5af4-452c-a78d-09bea8c8657e
          delivery-messages:
          - Thank you. Only §5<amount> §rmore to go!
        '5':
          break-block-durability: []
          items-to-deliver:
          - ==: org.bukkit.inventory.ItemStack
            v: 3953
            type: TORCHFLOWER
          npc-delivery-uuids:
          - 4f7b8055-5af4-452c-a78d-09bea8c8657e
          delivery-messages:
          - Thank you. Only §5<amount> §rmore to go!
    rewards:
      permissions:
      - nether.portal
      - multiverse.portal.access.nether
      - multiverse.portal.access.portal
      permission-worlds: []
    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 3 months ago

Try https://ci.codemc.io/job/PikaMug/job/Quests/492/