mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-04 00:37:46 +00:00
[CLEANUP] Reformatted code
This commit is contained in:
@@ -20,19 +20,19 @@ import java.util.Collection;
|
||||
*/
|
||||
public class Script implements Runnable {
|
||||
public static final int TYPE_STRATEGY = 0;
|
||||
public static final int TYPE_LOOP = 1;
|
||||
public static final int TYPE_OTHER = 2;
|
||||
public static final int TYPE_LOOP = 1;
|
||||
public static final int TYPE_OTHER = 2;
|
||||
|
||||
public static final int STATE_RUNNING = 0;
|
||||
public static final int STATE_PAUSE = 1;
|
||||
public static final int STATE_PAUSE = 1;
|
||||
public static final int STATE_STOPPED = 2;
|
||||
|
||||
private Collection<Strategy> strategies;
|
||||
private PBPreferences preferences;
|
||||
private AbstractFramework frameWork;
|
||||
private int state;
|
||||
private int frameWorkType;
|
||||
private int scriptID;
|
||||
private PBPreferences preferences;
|
||||
private AbstractFramework frameWork;
|
||||
private int state;
|
||||
private int frameWorkType;
|
||||
private int scriptID;
|
||||
|
||||
public boolean onExecute() {
|
||||
return true;
|
||||
@@ -141,6 +141,7 @@ public class Script implements Runnable {
|
||||
*
|
||||
* @param conn the condition.
|
||||
* @param timeout the time in miliseconds before it stops sleeping.
|
||||
*
|
||||
* @return whether it ran successfully without timing out.
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -148,18 +149,6 @@ public class Script implements Runnable {
|
||||
return Time.sleep(conn, timeout);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the script's state
|
||||
*
|
||||
* @param state
|
||||
*/
|
||||
public final void setState(final int state) {
|
||||
if (state < 0 || state > 2) {
|
||||
throw new IllegalArgumentException("Illegal state");
|
||||
}
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sleeps for an amount of milliseconds
|
||||
*
|
||||
@@ -173,6 +162,18 @@ public class Script implements Runnable {
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the script's state
|
||||
*
|
||||
* @param state
|
||||
*/
|
||||
public final void setState(final int state) {
|
||||
if (state < 0 || state > 2) {
|
||||
throw new IllegalArgumentException("Illegal state");
|
||||
}
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public PBPreferences getPreferences() {
|
||||
if (this.preferences == null) {
|
||||
this.preferences = new PBPreferences(scriptID);
|
||||
|
||||
Reference in New Issue
Block a user