Package org.dreambot.api.methods
Class MethodProvider
- java.lang.Object
-
- org.dreambot.api.methods.MethodProvider
-
- Direct Known Subclasses:
AbstractScript
,TaskNode
public class MethodProvider extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MethodProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(java.lang.Object msg)
Logs to console withLogger.LogType.DEBUG
Only logs if debug flag is enabledvoid
error(java.lang.Object msg)
Logs to console withLogger.LogType.ERROR
RandomManager
getRandomManager()
ScriptManager
getScriptManager()
void
info(java.lang.Object msg)
Logs to console withLogger.LogType.INFO
boolean
isUserSponsor()
Checks whether the DreamBot member logged into the client is a Sponsor or above (This includes but may not be limited to: Staff, Ex-Staff, Scripters, and Lead Designer)boolean
isUserVIP()
Checks whether the DreamBot member logged into the client is a VIP member or above (this includes but may not be limited to: Staff, Ex-Staff, Sponsor, Scripters, and Lead Designer)void
log(java.lang.Object object)
Prints to console withLogger.LogType.SCRIPT
void
print(java.lang.Object msg)
Prints to console withLogger.LogType.SCRIPT
void
sleep(long ms)
void
sleep(long min, long max)
boolean
sleepUntil(Condition terminate, long timeout, long polling)
boolean
sleepUntil(Condition terminate, Condition reset, long timeout, long polling)
boolean
sleepWhile(Condition condition, long timeout, long polling)
boolean
sleepWhile(Condition condition, Condition reset, long timeout, long polling)
-
-
-
Method Detail
-
sleep
public void sleep(long ms)
-
sleep
public void sleep(long min, long max)
-
sleepUntil
public boolean sleepUntil(Condition terminate, Condition reset, long timeout, long polling)
-
sleepUntil
public boolean sleepUntil(Condition terminate, long timeout, long polling)
-
sleepWhile
public boolean sleepWhile(Condition condition, Condition reset, long timeout, long polling)
-
sleepWhile
public boolean sleepWhile(Condition condition, long timeout, long polling)
-
getRandomManager
public RandomManager getRandomManager()
-
getScriptManager
public ScriptManager getScriptManager()
-
print
public void print(java.lang.Object msg)
Prints to console withLogger.LogType.SCRIPT
- Parameters:
msg
- message to print
-
log
public void log(java.lang.Object object)
Prints to console withLogger.LogType.SCRIPT
- Parameters:
object
- object to log
-
info
public void info(java.lang.Object msg)
Logs to console withLogger.LogType.INFO
- Parameters:
msg
- message to log
-
debug
public void debug(java.lang.Object msg)
Logs to console withLogger.LogType.DEBUG
Only logs if debug flag is enabled- Parameters:
msg
- message to log
-
error
public void error(java.lang.Object msg)
Logs to console withLogger.LogType.ERROR
- Parameters:
msg
- message to log
-
isUserVIP
public boolean isUserVIP()
Checks whether the DreamBot member logged into the client is a VIP member or above (this includes but may not be limited to: Staff, Ex-Staff, Sponsor, Scripters, and Lead Designer)- Returns:
- true if VIP or above
-
isUserSponsor
public boolean isUserSponsor()
Checks whether the DreamBot member logged into the client is a Sponsor or above (This includes but may not be limited to: Staff, Ex-Staff, Scripters, and Lead Designer)- Returns:
- true if Sponsor or above
-
-