Fix crash bug when spaces are entered in the address of a server

This commit is contained in:
rtm516 2021-02-07 15:10:06 +00:00
parent f5a93e8b11
commit 12028268c6
No known key found for this signature in database
GPG key ID: 331715B8B007C67A

View file

@ -65,7 +65,7 @@ public class Server {
}
public Server(String address, int port, boolean online, boolean bedrock, String name, String imageUrl) {
this(address, port, online, bedrock, name, imageUrl, ServerCategory.CUSTOM);
this(address.replaceAll(" ", ""), port, online, bedrock, name, imageUrl, ServerCategory.CUSTOM);
}
private int defaultPort() { return bedrock ? 19132 : 25565; }