Aelysium-Group / rusty-connector

A player and server connection manager for Velocity based Minecraft Networks!
GNU General Public License v3.0
77 stars 17 forks source link

/rc send causes disconnecting players to fail catch #34

Closed haakonhaug closed 9 months ago

haakonhaug commented 1 year ago

When you for example make a GUI or an NPC send a player via the rusty connector paper plugin to another server with "catch-disconnecting-players: true", it just says "There was an issue connecting you to that server!" and kicks the player.

nathan-i-martin commented 1 year ago

Are any other exceptions thrown in console? Also can this be reproduced consistently with the NPC? In other words does the NPC/GUI always fail to send the player or does it work sometimes?

haakonhaug commented 1 year ago

Nope no errors at all. Basically when the server is down it makes this error, or right after the server has started. And its not the NPC/GUI causing any problems because i have tried directly with the /rc send command aswell. Basically what would be nice is when i set "catch-disconnecting-players" to true, it would prevent the players from disconnecting instead of giving them the "There was an issue connecting you to that server!" screen.

nathan-i-martin commented 1 year ago

Okay and when the server is up and running do you get any issues? It's only when the server isn't ready that you get the error?

I think this is an improvement with rc send that can be made so that the error is sent in chat instead of disconnecting the player.

haakonhaug commented 1 year ago

Well sometimes i actually get the error after the servers has finished started. But that is not often. And btw i found an error, but only when i enabled family anchors. It seems like it can't find the server when i try to connect sometimes.

[18:01:04 ERROR]: java.lang.RuntimeException: There are no servers for you to connect to! [18:01:04 ERROR]: at group.aelysium.rustyconnector.plugin.velocity.lib.family.ScalarFamilyConnector.connect(ScalarServerFamily.java:124) [18:01:04 ERROR]: at group.aelysium.rustyconnector.plugin.velocity.lib.family.ScalarServerFamily.connect(ScalarServerFamily.java:29) [18:01:04 ERROR]: at group.aelysium.rustyconnector.plugin.velocity.lib.dynamic_teleport.anchors.commands.CommandAnchor.lambda$create$1(CommandAnchor.java:57) [18:01:04 ERROR]: at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) [18:01:04 ERROR]: at com.velocitypowered.proxy.command.VelocityCommandManager.executeImmediately0(VelocityCommandManager.java:226) [18:01:04 ERROR]: at com.velocitypowered.proxy.command.VelocityCommandManager.lambda$executeImmediatelyAsync$1(VelocityCommandManager.java:264) [18:01:04 ERROR]: at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) [18:01:04 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [18:01:04 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [18:01:04 ERROR]: at java.base/java.lang.Thread.run(Thread.java:833) [18:01:12 ERROR]: java.lang.RuntimeException: There are no servers for you to connect to! [18:01:12 ERROR]: at group.aelysium.rustyconnector.plugin.velocity.lib.family.ScalarFamilyConnector.connect(ScalarServerFamily.java:124) [18:01:12 ERROR]: at group.aelysium.rustyconnector.plugin.velocity.lib.family.ScalarServerFamily.connect(ScalarServerFamily.java:29) [18:01:12 ERROR]: at group.aelysium.rustyconnector.plugin.velocity.lib.dynamic_teleport.anchors.commands.CommandAnchor.lambda$create$1(CommandAnchor.java:57) [18:01:12 ERROR]: at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) [18:01:12 ERROR]: at com.velocitypowered.proxy.command.VelocityCommandManager.executeImmediately0(VelocityCommandManager.java:226) [18:01:12 ERROR]: at com.velocitypowered.proxy.command.VelocityCommandManager.lambda$executeImmediatelyAsync$1(VelocityCommandManager.java:264) [18:01:12 ERROR]: at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) [18:01:12 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [18:01:12 ERROR]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [18:01:12 ERROR]: at java.base/java.lang.Thread.run(Thread.java:833)

nathan-i-martin commented 1 year ago

Yeah I mean just because the server has started doesn't mean it's registered and ready to be connected to. You gotta wait until you see the green "connected to the proxy" text in chat. I suspect that that's also what's causing the issue with the anchors.

haakonhaug commented 1 year ago

This error also happens sometimes when the server has been running for a long time. But it would be nice if a function was implemented so nothing happens instead of getting kicked or if it says cant connect to server or something like that.

nathan-i-martin commented 1 year ago

Yeah as I mentioned earlier this is an improvement that can most certainly be made. In the meantime could you try causing the error again and then look through your message cache (/rc message list) and find the send message that's issued? It should show as red and there should be some details on it that I can see

haakonhaug commented 1 year ago

I did /rc message list and went through every page but everything is green and it just says Status: EXECUTED and some other normal non error information, sorry.

nathan-i-martin commented 1 year ago

Gotcha, could you look for one which has "t:200" and send a screenshot? I wanna look at the data being passed and make sure it's all correct

haakonhaug commented 1 year ago

Hmmm. For some reason i can't find anything that is t:200, everything just has t:100. But i will be glad to give you more info if i find something.

nathan-i-martin commented 1 year ago

Gotcha, so t:200 represents the /rc send command request. So that's why I was wanting to find that. If you're able to get it to show up def lemme know cause that'll help