2024-04-10 09:19:02 +01:00
|
|
|
package cc.fascinated.common;
|
|
|
|
|
2024-04-10 12:26:47 +01:00
|
|
|
import cc.fascinated.exception.impl.BadRequestException;
|
2024-04-10 09:19:02 +01:00
|
|
|
import lombok.experimental.UtilityClass;
|
|
|
|
|
|
|
|
@UtilityClass
|
|
|
|
public class ServerUtils {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the address of the server.
|
|
|
|
*
|
|
|
|
* @return the address of the server
|
|
|
|
*/
|
|
|
|
public static String getAddress(String ip, int port) {
|
|
|
|
return ip + (port == 25565 ? "" : ":" + port);
|
|
|
|
}
|
|
|
|
}
|