Dueris / OriginsPaper

Custom Origins Plugin for PaperMC
https://modrinth.com/plugin/originspaper
Other
27 stars 4 forks source link

[BUG] - Tab-Complete error #32

Closed ForeignBloom226 closed 1 year ago

ForeignBloom226 commented 1 year ago

Describe the bug When i try to target someone in a specific command, a console error i get

Plugin Version mc1.20-v0.1.7

Minecraft version My server is running Paper version git-Paper-36 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: faf9a65)

Server software Paper

Steps to reproduce

What should happen? Show me a list of available people to choose

What is happening instead? Sends a large console error and a chat message "An internal error occurred...", this is just when i use the cmd in-game

Stacktrace/Errors on Console origin get foreignbloom226 [18:23:45 INFO]: ForeignBloom226 has the following Origin: origins:human [18:23:51 ERROR]: Exception when ForeignBloom226 attempted to tab complete origin get org.bukkit.command.CommandException: Unhandled exception during tab completion for command '/origin get ' in plugin GenesisMC vmc1.20-v0.1.7 at org.bukkit.command.PluginCommand.tabComplete(PluginCommand.java:150) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.command.Command.tabComplete(Command.java:93) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.command.SimpleCommandMap.tabComplete(SimpleCommandMap.java:240) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.tabCompleteCommand(CraftServer.java:2287) ~[paper-1.20.1.jar:git-Paper-36] at org.bukkit.craftbukkit.v1_20_R1.CraftServer.tabComplete(CraftServer.java:2259) ~[paper-1.20.1.jar:git-Paper-36] at org.bukkit.craftbukkit.v1_20_R1.command.BukkitCommandWrapper.getSuggestions(BukkitCommandWrapper.java:74) ~[paper-1.20.1.jar:git-Paper-36] at com.mojang.brigadier.tree.ArgumentCommandNode.listSuggestions(ArgumentCommandNode.java:71) ~[brigadier-1.1.8.jar:git-Paper-36] at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:602) ~[paper-1.20.1.jar:?] at com.mojang.brigadier.CommandDispatcher.getCompletionSuggestions(CommandDispatcher.java:582) ~[paper-1.20.1.jar:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleCustomCommandSuggestions$5(ServerGamePacketListenerImpl.java:920) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-36] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1339) ~[paper-1.20.1.jar:git-Paper-36] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-36] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1316) ~[paper-1.20.1.jar:git-Paper-36] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1309) ~[paper-1.20.1.jar:git-Paper-36] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1287) ~[paper-1.20.1.jar:git-Paper-36] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1175) ~[paper-1.20.1.jar:git-Paper-36] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-36] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013) ~[?:?] at java.util.ArrayList$Itr.next(ArrayList.java:967) ~[?:?] at me.dueris.genesismc.core.commands.TabAutoComplete.onTabComplete(TabAutoComplete.java:90) ~[genesismc-mc1.20-v0.1.7.jar:?] at org.bukkit.command.PluginCommand.tabComplete(PluginCommand.java:138) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] ... 22 more

Dueris commented 1 year ago

This was a bug found in 0.1.7 and was quickly patched after the release, we didnt catch it somehow in final testing lol. We didnt release another hotfix because we found another bug with commands. Lets just say the command system broke a bit lol.

ForeignBloom226 commented 1 year ago

Well, i don't think it's necessary to open another issue but... One player told me that despite of getting a new origin, the old one doesn't let him do some things despite he had the new one.

Player 1 had Blaze Origin and the he moved to Merling, after that he was spawning on nether, no one problem was send to console, so i don't get what's happening.

Dueris commented 1 year ago

It's occurred a few times during my testing, but there is no direct cause. The only fix atm is to leave and rejoin for the powers to be reassigned. Upon choosing one issue may be that it unloads and loads the powers at the same time meaning it counts the old parse data, I will check rn to be sure

Dueris commented 1 year ago

It should be fixed now. I added a few ticks in delay to assigning the powers, so it should work fine now

Dueris commented 1 year ago

I did it on my phone tho lol. My pc is being weird today lol

Dueris commented 1 year ago

That bug should be patched now!! Is there anything else?

Dueris commented 1 year ago

I got like 3 hours until I go to bed so I can knock out a few of these bugs rn lol

ForeignBloom226 commented 1 year ago

That bug should be patched now!! Is there anything else?

I've got a doubt, when someone choose the merling origin, should the plugin teleport the player to the nearest sea or just to a ocean/sea?

Dueris commented 1 year ago

In the origins mod it doesn't do that, so I didn't implement it into the plugin

Dueris commented 1 year ago

Are there any other bugs you have found, or can I close this issue?

ForeignBloom226 commented 1 year ago

Are there any other bugs you have found, or can I close this issue?

At the moment, no

Dueris commented 1 year ago

Alrighty