public void PingTest() { // Note: make a better test with TcpListener and some fake handshake to test this method var address = "mc.hypixel.net"; var port = 25565; var server = new MCServer(address, port); var ping = server.Ping(); if (ping <= 0) { throw new InvalidDataException("Ping cannot be equal to or less than 0."); } }