Beispiel #1
0
 public static void parse(Main m, String[] params) {
   System.out.println("Parsing ...");
   for (int i = 0; i < params.length; i++) {
     System.out.println("- " + params[i]);
   }
   for (int i = 0; i < params.length; i++) {
     String s = params[i];
     if (s.equals("mcpath")) {
       m.mcpath = params[++i];
     } else if (s.equals("action")) {
       m.addAction(params[++i]);
     } else System.out.println("UNKNOWN CONFIG LINE: " + s);
   }
   System.out.println("... Done.");
 }
Beispiel #2
0
 public static void main(String[] args) {
   Main m = new Main();
   parse(m, ConfigParser.expand(args));
   m.start();
 }