public void Kill() { if (!isRunning) { cwrite("Bot is not running!", COLOR_WARN); return; } cwrite("Bot is shutting down."); if (mainModule.getState() == State.BATTLE) { mainModule.forfeitBattle(); } isRunning = false; closeBrowser(); }