Package com.briman0094.bribot

Source Code of com.briman0094.bribot.BriBotConsole

package com.briman0094.bribot;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import com.briman0094.bribot.modules.game.ModDice;
import com.briman0094.bribot.modules.general.ModGeneralActions;
import com.briman0094.bribot.modules.regex.ModRegexReplace;

public class BriBotConsole
{
  public static void main(String[] args)
  {
    try
    {
      BriBot bribot = new BriBot();
      bribot.registerModule("generalCommands", new ModGeneralActions());
      bribot.registerModule("diceRoller", new ModDice());
      bribot.registerModule("regex", new ModRegexReplace());
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      while (bribot.isConnected())
      {
        String input = br.readLine();
        if (!input.equals(""))
          bribot.handleInput(input);
        Thread.sleep(10); // rest time
      }
    }
    catch (Exception e)
    {
      e.printStackTrace();
      System.exit(1);
    }
    System.exit(0);
  }
}
TOP

Related Classes of com.briman0094.bribot.BriBotConsole

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.