Class Leaf
- java.lang.Object
-
- org.dreambot.api.script.frameworks.treebranch.Leaf
-
- Direct Known Subclasses:
Branch
public abstract class Leaf extends java.lang.Object
Base leaf of the framework, abstract class to be extended on for behavior functionality
-
-
Constructor Summary
Constructors Constructor Description Leaf()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Branch
getParent()
TreeScript
getTree()
Gets theTreeScript
parent of this Leafabstract boolean
isValid()
Boolean to check if this leaf should be run or not Implementation requiredabstract int
onLoop()
Main execution method for the leaf Implementation requiredvoid
setParent(Branch parent)
-
-
-
Method Detail
-
isValid
public abstract boolean isValid()
Boolean to check if this leaf should be run or not Implementation required- Returns:
- true if it should be run, else false
-
onLoop
public abstract int onLoop()
Main execution method for the leaf Implementation required- Returns:
- < 0 if you want script to stop, otherwise script sleeps for return value
-
getTree
public TreeScript getTree()
Gets theTreeScript
parent of this Leaf- Returns:
- Tree parent of this leaf
-
getParent
public Branch getParent()
-
setParent
public void setParent(Branch parent)
-
-