Exemple #1
0
 public void run() {
   mcp.setDirectory(mcpath);
   mcp.start();
   while (mcp.isRunning()) {
     try {
       Thread.sleep(50);
     } catch (Exception e) {
     }
   }
 }
Exemple #2
0
 public void addAction(String action) {
   try {
     Class<?> c = Class.forName(action);
     Constructor init = c.getConstructor(new Class[] {MinecraftProcess.class});
     Action a = (Action) init.newInstance(new Object[] {mcp});
     mcp.addAction(a);
   } catch (Exception e) {
     e.printStackTrace(System.err);
     System.exit(1);
   }
 }