mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-03 00:37:55 +00:00
To merge
This commit is contained in:
@@ -75,8 +75,6 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
JMenuItem randoms = new JMenuItem("Randoms");
|
||||
JMenuItem dialog = new JCheckBoxMenuItem("Disable dialog");
|
||||
|
||||
JMenuItem api = new JMenuItem("Set API key");
|
||||
|
||||
if (!OperatingSystem.getOS().equals(OperatingSystem.WINDOWS)) {
|
||||
dialog.setSelected(true);
|
||||
}
|
||||
@@ -105,7 +103,6 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
run.addActionListener(this);
|
||||
pause.addActionListener(this);
|
||||
stop.addActionListener(this);
|
||||
api.addActionListener(this);
|
||||
|
||||
file.add(screenshot);
|
||||
file.add(proxy);
|
||||
@@ -117,7 +114,6 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
scripts.add(run);
|
||||
scripts.add(pause);
|
||||
scripts.add(stop);
|
||||
scripts.add(api);
|
||||
|
||||
menuBar.add(file);
|
||||
menuBar.add(scripts);
|
||||
@@ -130,9 +126,6 @@ public class BotUI extends JFrame implements ActionListener, ComponentListener,
|
||||
String command = e.getActionCommand();
|
||||
|
||||
switch (command) {
|
||||
case "Set API key":
|
||||
String api = JOptionPane.showInputDialog(this, "You can gather your API key from http://bdn.parabot.org/account/");
|
||||
break;
|
||||
case "Create screenshot":
|
||||
JOptionPane.showMessageDialog(this, "We are still working on this...");
|
||||
break;
|
||||
|
||||
@@ -38,7 +38,6 @@ public class UlirathaClient extends Thread {
|
||||
|
||||
private void connect() {
|
||||
try {
|
||||
System.out.println("Connecting....");
|
||||
NIOService service = new NIOService();
|
||||
service.setExceptionObserver(new ExceptionObserver() {
|
||||
@Override
|
||||
@@ -90,8 +89,11 @@ public class UlirathaClient extends Thread {
|
||||
|
||||
public void connectionBroken(NIOSocket nioSocket, Exception exception) {
|
||||
if (valid) {
|
||||
Logger.addMessage("We lost connection with the Uliratha server, reconnecting...");
|
||||
reconnect();
|
||||
connected = false;
|
||||
}else{
|
||||
Logger.addMessage("We're disconnected from the Uliratha server");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user