public void run() { mcp.setDirectory(mcpath); mcp.start(); while (mcp.isRunning()) { try { Thread.sleep(50); } catch (Exception e) { } } }
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); } }