Closed MiguVT closed 5 months ago
I don’t really understand what has changed, entry.getKey() returns BaseServer anyway
You're correct that entry.getKey() returns a BaseServer. The change was not about what entry.getKey() returns, but rather about how we use it. In the previous version, there was a type mismatch issue causing a ClassCastException. The updated code ensures that we are correctly creating a SpigotServer instance using the BaseServer details. This is done by correctly passing the InetSocketAddress from baseServer.getInetSocketAddress() to the SpigotServer constructor, which was the main cause of the issue.
Resolved the ClassCastException that was occurring in the SocketClientListener class. The issue was due to an incorrect type being passed to the SpigotServer constructor. The correct InetSocketAddress is now being passed, eliminating the error.