mirror of
https://github.com/2006-Scape/Parabot-Randoms.git
synced 2026-07-06 16:51:36 +00:00
[BUGFIX] Fixed a null pointer
Also removed unused randoms and cleaned up code
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user