[BUGFIX] Fixed a null pointer

Also removed unused randoms and cleaned up code
This commit is contained in:
Emma Stone
2017-02-01 20:46:02 +00:00
parent 3e6a2365ce
commit 59d877104b
10 changed files with 20 additions and 59 deletions
@@ -21,6 +21,7 @@ public class MouseOnScreen implements Random {
public void execute() {
int x = org.parabot.environment.api.utils.Random.between(100, Context.getInstance().getApplet().getWidth());
int y = org.parabot.environment.api.utils.Random.between(100, Context.getInstance().getApplet().getHeight());
Mouse.getInstance().moveMouse(x, y);
}
@@ -39,7 +40,7 @@ public class MouseOnScreen implements Random {
return RandomType.SCRIPT;
}
private boolean onScreen(){
private boolean onScreen() {
Point loc = Mouse.getInstance().getPoint();
return Context.getInstance().getApplet().contains(loc);
}