mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-10-01 02:17:22 +00:00
Fixed pausing the bot
This commit is contained in:
@@ -28,12 +28,8 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
private JMenuItem run, pause, stop;
|
||||
private boolean runScript, pauseScript;
|
||||
|
||||
public static BotUI getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
public BotUI(String username, String password) {
|
||||
if(instance != null) {
|
||||
if (instance != null) {
|
||||
throw new IllegalStateException("BotUI already created");
|
||||
}
|
||||
instance = this;
|
||||
@@ -58,9 +54,13 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
setLocationRelativeTo(null);
|
||||
BotDialog.getInstance(this);
|
||||
|
||||
if (!OperatingSystem.getOS().equals(OperatingSystem.WINDOWS)) {
|
||||
BotDialog.getInstance().setVisible(false);
|
||||
}
|
||||
if (!OperatingSystem.getOS().equals(OperatingSystem.WINDOWS)) {
|
||||
BotDialog.getInstance().setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
public static BotUI getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void createMenu() {
|
||||
@@ -191,7 +191,9 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
}
|
||||
|
||||
private void setScriptState(int state) {
|
||||
Context.getInstance().getRunningScript().setState(state);
|
||||
if (Context.getInstance().getRunningScript() != null) {
|
||||
Context.getInstance().getRunningScript().setState(state);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user