gt22

Untitled

Oct 26th, 2016
469
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.21 KB | None | 0 0
  1. package com.projectbronze.botlauncher;
  2.  
  3. import java.io.File;
  4. import java.io.IOException;
  5. import com.projectbronze.botlauncher.config.Config;
  6. import com.projectbronze.botlauncher.json.BotJson;
  7. import com.projectbronze.botlauncher.log.LogStream;
  8.  
  9. public class Core
  10. {
  11.     public static LogStream log, err;
  12.    
  13.     public static void main(String[] args) throws IOException
  14.     {
  15.         log = new LogStream(System.out);
  16.         err = new LogStream(System.err);
  17.         Config.init();
  18.         File bot = new File("bot.json");
  19.         if(args.length == 0)
  20.         {
  21.             if(bot.exists())
  22.             {
  23.                
  24.             }
  25.             else
  26.             {
  27.                 err.error("Unable to find bot.json");
  28.             }
  29.         }
  30.         else
  31.         {
  32.             switch(args[0])
  33.             {
  34.                 case "autorun":
  35.                 case "auto":
  36.                 {
  37.                     if(Config.startUpBotDirectory.equals("NONE"))
  38.                     {
  39.                         err.error("Autorun bot not specified");
  40.                     }
  41.                     else
  42.                     {
  43.                        
  44.                     }
  45.                     break;
  46.                 }
  47.                 case "init":
  48.                 {
  49.                     BotJson.init();
  50.                     break;
  51.                 }
  52.                 case "setAuto":
  53.                 {
  54.                     if(bot.exists())
  55.                     {
  56.                         Config.startUpBotDirectory = new File("").getAbsolutePath();
  57.                         Config.updateCfg();
  58.                     }
  59.                     else
  60.                     {
  61.                         err.error("Unable to find bot.json, use `init` command");
  62.                     }
  63.                 }
  64.             }
  65.         }
  66.     }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment