Created
August 5, 2018 16:14
-
-
Save Aang23/3b2e1fbaea70aaea69996e679552f329 to your computer and use it in GitHub Desktop.
main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main; | |
import modes.StartOffline; | |
import modes.StartOnline; | |
import setup.DirectorySetup; | |
import utils.LogsUtils; | |
import utils.NetworkUtils; | |
public class Launcher { | |
public static void main(String[] args){ | |
DirectorySetup.initialSetupDir(); | |
LogsUtils.log("Init..."); | |
DirectorySetup.setupLauncherDir(); | |
LogsUtils.log("Checking network availablity..."); | |
if(NetworkUtils.isServerReachable()) { | |
LogsUtils.log("Network state : AVAILABLE"); | |
LogsUtils.log("Starting in online mode"); | |
StartOnline.StartOnline(); | |
} else { | |
LogsUtils.log("Network state : UNAVAILABLE"); | |
LogsUtils.log("Starting in offline mode"); | |
StartOffline.StartOffline(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment