Closed vbisbest closed 10 years ago
The ping handler replies either the same version if it's supported by bungee or a supported version if the client is not supported. If it was done in any other way it would break protocol compatibility.
Thank you for the quick response. Could you give me more details on exactly what is returned? I have seen where some servers return -1 for protocol, others return just the same version like you say. Perhaps the -1 is from an older version of Bungee Cord? The problem I have is that my app supports version MC 1.6.4 and higher protocol. But it only works if I know which protocol to use or like you said, it breaks.
Supported protocol versions are listed here. If the ping request version matches one of those, the same version is returned, otherwise the latest one.
On May 27, 2014 8:03:36 PM CEST, Ray Kelly notifications@github.com wrote:
Thank you for the quick response. Could you give me more details on exactly what is returned? I have seen where some servers return -1 for protocol, others return just the same version like you say. Perhaps the -1 is from an older version of Bungee Cord? The problem I have is that my app supports version MC 1.6.4 and higher protocol. But it only works if I know which protocol to use or like you said, it breaks.
Reply to this email directly or view it on GitHub: https://github.com/SpigotMC/BungeeCord/issues/1030#issuecomment-44312334
Ok, so I guess the problem I have is that I send protocol 5 for the ping request (I always send latest). The server is really running protocol 4 but yet it returns 5. So my application is now going to use the wrong protocol. Does that make sense? I am not sure how I can have 1 app to support multiple protocol version when Bungee Cord does not return the real version number. Is there a reason it cant return its real server protocol version?
Returning a different value than the client would make the client show it as incompatible and would not let you connect.
On May 27, 2014 8:14:27 PM CEST, Ray Kelly notifications@github.com wrote:
Ok, so I guess the problem I have is that I send protocol 5 for the ping request (I always send latest). The server is really running protocol 4 but yet it returns 5. So my application is now going to use the wrong protocol. Does that make sense? I am not sure how I can have 1 app to support multiple protocol version when Bungee Cord does not return the real version number. Is there a reason it cant return its real server protocol version?
Reply to this email directly or view it on GitHub: https://github.com/SpigotMC/BungeeCord/issues/1030#issuecomment-44314148
Right, that's the point. The client should decide what message or action to show (ok to connect, server too old, client to old etc). I tested this using Vanilla MC and it returns the real server protocol, not the one sent in the ping request. For instance, I ping the current snapshot with protocol 5, it returns 20. If I ping a Vanilla 1.7.2 version with protocol 5, it returns 4 (which is good because I support both versions). It would be great if Bungee Cord could act the same as Vanilla MC.
Uh, no, it wouldn't work that way. Bungee supports all versions in that list, independent from the version of the background minecraft server.
On May 27, 2014 9:28:13 PM CEST, Ray Kelly notifications@github.com wrote:
Right, that's the point. The client should decide what message or action to show (ok to connect, server too old, client to old etc). I tested this using Vanilla MC and it returns the real server protocol, not the one sent in the ping request. For instance, I ping the current snapshot with protocol 5, it returns 20. If I ping a Vanilla 1.7.2 version with protocol 5, it returns 4 (which is good because I support both versions). It would be great if Bungee Cord could act the same as Vanilla MC.
Reply to this email directly or view it on GitHub: https://github.com/SpigotMC/BungeeCord/issues/1030#issuecomment-44323180
I see, so you are in the same boat I am. Supporting multiple MC versions with one codebase. Unfortunately, once you get past your part, bungee cord is breaking my part. I have no way to detect the real server version after bungee cord changes the server version. I would be forced to have users know or guess what version the server is running and set that as a setting for the server before connecting. This would fail for most, especially kids and noobs. The way would go about it is:
Server == 1.7.2
This way it would behave the same as Vanilla MC and only return valid versions. Thoughts? And thanks again for the quick responses and your help :)
This would disallow people with protocol version 5 to connect because their client thinks the server is outdated.
On May 27, 2014 9:43:03 PM CEST, Ray Kelly notifications@github.com wrote:
I see, so you are in the same boat I am. Supporting multiple MC versions with one codebase. Unfortunately, once you get past your part, bungee cord is breaking my part. I have no way to detect the real server version after bungee cord changes the server version. I would be forced to have users know or guess what version the server is running and set that as a setting for the server before connecting. This would fail for most, especially kids and noobs. The way would go about it is:
Server == 1.7.2
- Ping request comes in from client with protocol 5
- Bungee cord pulls the real server version
- Bungee cord checks against known compatible versions (e.g. 4,5,14)
- If supported, return the real version (e.g. 4).
- If not supported, return -1 or some value to say not supported
This way it would behave the same as Vanilla MC and only return valid versions. Thoughts? And thanks again for the quick responses and your help :)
Reply to this email directly or view it on GitHub: https://github.com/SpigotMC/BungeeCord/issues/1030#issuecomment-44324962
No, I don't think that is the case. Server == 1.7.4 (protocol 5)
Am I missing something? Can you give me a scenario where it would not work?
sorry, one of my steps got wacked. If supported, return the real version (e.g. 5).
Client sends 5, it needs to return 5 because it's supported. Client sends 4 it replies 4 because 4 is supported as well. I don't see any way to accomplish multi version support any other way, even if polling the background server version was possible.
On May 27, 2014 10:04:04 PM CEST, Ray Kelly notifications@github.com wrote:
sorry, one of my steps got wacked. If supported, return the real version (e.g. 5).
Reply to this email directly or view it on GitHub: https://github.com/SpigotMC/BungeeCord/issues/1030#issuecomment-44327717
I think you are missing something. If the client sends 5 and the server returns 4, the MC client shows the red X and "Not Supported". The MC client knows how to handle invalid server versions already. Again, this is how Vanilla MC works. If add a server running a snapshot to 1.7.4 MC Client, a red X shows up and you cannot connect. Same if you add a 1.7.2 server, the client sends protocol 5 and the server returns protocol 4. The MC Client shows a red X and does not allow you to connect. Isn't that correct?
Bungee is multi-version. Both 4 and 5 can connect without any trouble. Both versions are completely supported regardless of background server version.
On May 27, 2014 10:16:07 PM CEST, Ray Kelly notifications@github.com wrote:
I think you are missing something. If the client sends 5 and the server returns 4, the MC client shows the red X and "Not Supported". The MC client knows how to handle invalid server versions already.
Again, this is how Vanilla MC works. If add a server running a snapshot to 1.7.4 MC Client, a red X shows up and you cannot connect. Same if you add a 1.7.2 server, the client sends protocol 5 and the server returns protocol 4. The MC Client shows a red X and does not allow you to connect. Isn't that correct?
Reply to this email directly or view it on GitHub: https://github.com/SpigotMC/BungeeCord/issues/1030#issuecomment-44329170
Right, so in what case does it fail if you make the change to return the real version? It should have no effect on the current MC client. If you have time, skype might be easier for this discussion. I have thousands of users that are effected by this issue and would really like to get it fixed for them. Just let me know. Thanks!
Skype is not an option for me, sorry, #md_5 on spigot irc is the place to ask.
It returns one of the protocol versions if the client is very old, 1.6 or something, that are not supported anyway.
On May 27, 2014 10:25:49 PM CEST, Ray Kelly notifications@github.com wrote:
Right, so in what case does it fail if you make the change to return the real version? It should have no effect on the current MC client. If you have time, skype might be easier for this discussion. I have thousands of users that are effected by this issue and would really like to get it fixed for them. Just let me know. Thanks!
Reply to this email directly or view it on GitHub: https://github.com/SpigotMC/BungeeCord/issues/1030#issuecomment-44330567
Bungeecord must echo the version to the client (if it is supported) otherwise the client will display the server as out of date. Bungeecord supports multiple clients all using different versions at the same time (with a supporting backend like spigot) so there isn't a 'real' version that it can return. Sorry about the issues this causes to your client but this can't be helped with the way the protocol is currently designed.
I'll add to this and say that assuming a BungeeCord supporting protocols 6,7 and 8. You send 4: Get back 8 You send 6: Get back 6 You send 7: Get back 7 You sent 11: get back 8
This seems as designed to me.
Why does the protocol version in the ping request just send back the version that was sent in the request (basically just an echo of the protocol)? Is it possible to change that to return the real protocol version that MC that is currently installed? The reason this would help is for custom clients to be able to make a decision based on the protocol. For instance if client sends a protocol version of 6, and the server returns 5, then the client can decide to connect anyways or let the player know that the server is outdated. Right now the server returns 6 when 5 is really installed and things break. I hope this is possible to do. Thanks!