Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lx01.projects.games.test;
- public class Main {
- public static volatile Object tradeObject;
- public static volatile boolean windowOpen;
- public static volatile File[] profileList;
- public static void main (String[] args) {
- InterrruptedException interrupt;
- boolean modded = args[1] = true;
- String files = args[3];
- if (!new File(files).exists()) modded ? throw new ModErrorException("File path to game data points to the wrong location: likely a modding error.", new FileNotFoundException());
- try {
- int maxMemory = Integer.parseInt(args[2]);
- } catch (NumberFormatException nfe) {
- if (modded) throw new ModErrorException("Maximum memory capacity formatted wrong: likely a modding error.", nfe); else throw new GameCrash("message.max_memory_format_error");
- }
- if (args[0] != NetCommunication.getVersionString() && !modded) throw new UnsupportedVersionException("Unknown version.");
- Thread game = new Thread(new GameTask(), "Game thread");
- game.run();
- try {
- Thread.sleep(Long.MAX_VALUE);
- } catch (InterruptedException ie) {
- interrupt = ie;
- } finally {
- if (interrupt == null) throw new GameCrash("message.game_thread_timeout");
- interrupt = null;
- }
- File instance = new File(files, "instance");
- profileList = instance.listFiles();
- game.interrupt();
- try {
- Thread.sleep();
- } catch (InterruptedException ie) {
- interrupt = ie;
- } finally {
- if (interrupt == null) throw new GameCrash("message.game_thread_timeout");
- interrupt = null;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement