Merge branch 'bugfix/zeroarg-callbacks' of github.com:shadowrs/Parabot into bugfix/zeroarg-callbacks

This commit is contained in:
Shadowrs
2018-09-10 12:21:09 +01:00
3 changed files with 23 additions and 0 deletions
@@ -185,9 +185,13 @@ public class Context {
panel.add(gameApplet); panel.add(gameApplet);
panel.validate(); panel.validate();
serverProvider.preAppletInit();
gameApplet.init(); gameApplet.init();
gameApplet.start(); gameApplet.start();
serverProvider.postAppletStart();
java.util.Timer t = new java.util.Timer(); java.util.Timer t = new java.util.Timer();
t.schedule(new TimerTask() { t.schedule(new TimerTask() {
@Override @Override
@@ -37,6 +37,9 @@ public class ServerDescription implements Comparable<ServerDescription> {
@Override @Override
public int compareTo(ServerDescription o) { public int compareTo(ServerDescription o) {
if (this.getServerName().equalsIgnoreCase(o.getServerName())) {
return 1;
}
return this.getServerName().compareTo(o.getServerName()); return this.getServerName().compareTo(o.getServerName());
} }
@@ -146,4 +146,20 @@ public abstract class ServerProvider implements Opcodes {
} }
/**
* Called in Context.setApplet before applet.init() is called. Exclusively used for manipulating the Frame attached
* to the applet of Roatpkz.
*/
public void preAppletInit() {
}
/**
* Called in Context.setApplet before after applet.start() and applet.init() are called. Exclusively used for manipulating the Frame attached
* to the applet of Roatpkz.
*/
public void postAppletStart() {
}
} }