ezeiger92 / QuestWorld2

GUI based questing plugin for Bukkit based Minecraft servers
Other
26 stars 10 forks source link

Internal error /quests #139

Closed hiltune closed 6 years ago

hiltune commented 6 years ago

Hey! When I'm trying to open a specific quests category using "/quests 0", the result is "An internal error occurred while attempting to perform this command". The same goes with all categories. I'm running QuestWorld2 on 1.12.2 and everything should be set up correctly...

Here's the console. I personally can't really tell anything about it. Hope you can help!

10.09 19:19:53 [Server] ERROR null 10.09 19:19:53 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'quests' in plugin QuestWorld v2.7.0 10.09 19:19:53 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) ~[PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:673) ~[PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1472) ~[PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1277) ~[PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_91] 10.09 19:19:53 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:843) [PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:426) [PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767) [PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) [PaperSpigot-1.12.2.jar:git-Paper-1293] 10.09 19:19:53 [Server] INFO at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91] 10.09 19:19:53 [Server] INFO Caused by: java.lang.ArrayIndexOutOfBoundsException

Thanks!

ezeiger92 commented 6 years ago

Thought I already replied to this, but apparently not. That is not a full stacktrace, and does not show where the exception came from. Please post the full stacktrace.

hiltune commented 6 years ago

That's all. The console didn't give me anything else. I also checked all the logs and couldn't find any longer error messages. Where should I look for it?

ezeiger92 commented 6 years ago

There should be more immediately after Caused by: java.lang.ArrayIndexOutOfBoundsException

hiltune commented 6 years ago

But there isn't. The last line is "Caused by: java.lang.ArrayIndexOutOfBoundsException".

ezeiger92 commented 6 years ago

Could you send the whole log file?

hiltune commented 6 years ago

https://pastebin.com/f2Sv3jMF , that's quite a lot of text but hope you can get something out of it.

ezeiger92 commented 6 years ago

Good lord you have a lot of other errors there, your server doing alright?

There was an earlier stacktrace with what I needed:

org.bukkit.command.CommandException: Unhandled exception executing command 'quests' in plugin QuestWorld v2.7.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[PaperSpigot-1.12.2.jar:git-Paper-1293]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:151) ~[PaperSpigot-1.12.2.jar:git-Paper-1293]
    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:673) ~[PaperSpigot-1.12.2.jar:git-Paper-1293]
    at net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1472) ~[PaperSpigot-1.12.2.jar:git-Paper-1293]
    at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1277) ~[PaperSpigot-1.12.2.jar:git-Paper-1293]
    at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) ~[PaperSpigot-1.12.2.jar:git-Paper-1293]
    at net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:5) ~[PaperSpigot-1.12.2.jar:git-Paper-1293]
    at net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14) ~[PaperSpigot-1.12.2.jar:git-Paper-1293]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_91]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91]
    at net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46) [PaperSpigot-1.12.2.jar:git-Paper-1293]
    at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:843) [PaperSpigot-1.12.2.jar:git-Paper-1293]
    at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:426) [PaperSpigot-1.12.2.jar:git-Paper-1293]
    at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:767) [PaperSpigot-1.12.2.jar:git-Paper-1293]
    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665) [PaperSpigot-1.12.2.jar:git-Paper-1293]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
    at java.util.ArrayList.elementData(ArrayList.java:418) ~[?:1.8.0_91]
    at java.util.ArrayList.get(ArrayList.java:431) ~[?:1.8.0_91]
    at com.questworld.api.menu.PagedMapping.build(PagedMapping.java:133) ~[?:?]
    at com.questworld.api.menu.PagedMapping.build(PagedMapping.java:127) ~[?:?]
    at com.questworld.api.menu.QuestBook.openCategory(QuestBook.java:385) ~[?:?]
    at com.questworld.command.QuestsCommand.open(QuestsCommand.java:99) ~[?:?]
    at com.questworld.command.QuestsCommand.onCommand(QuestsCommand.java:77) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[PaperSpigot-1.12.2.jar:git-Paper-1293]
    ... 15 more
hiltune commented 6 years ago

The server is still in development and some of the plugins are not up to date right now... so that explains a lot of the other errors in the logs. But did you find the cause of the quests error?

ezeiger92 commented 6 years ago

QuestsCommand.java:27 - int page = -1; Why is my default -1? That's so dumb.

ezeiger92 commented 6 years ago

Workaround: /quests [category] page 0

I wasn't planning on any more patches for 1.12.2, but it will definitely be fixed for 1.13.1

hiltune commented 6 years ago

That command gave me no results but /quests 0 0 kinda does the job. Thanks for the help anyways!

One another question: Is there a way to somehow disable some of the "Back" buttons between the guis? That would allow players to only access certain quests from certain NPCs.

For example:

I have two categories with different quests. Those categories can be accessed by clicking a certain NPC. The quest book and the command "/quests" is disabled so the players shouldn't be able to see the categories unless they visit the NPC. But actually they still can by clicking one NPC (which runs command /quests 0 0 and opens one of the categories) and then clicking the "Back" button so they can access the other categories just like that.

Is there a way to block this? Hope you understood my poor example.

ezeiger92 commented 6 years ago

Fixed in d1bb03ce98da89f01fc44c82506530cc0edd3d9f