Class Leaf
- java.lang.Object
-
- org.dreambot.api.script.frameworks.treebranch.Leaf
-
- Direct Known Subclasses:
Branch
public abstract class Leaf extends java.lang.ObjectBase 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 BranchgetParent()TreeScriptgetTree()Gets theTreeScriptparent of this Leafabstract booleanisValid()Boolean to check if this leaf should be run or not Implementation requiredabstract intonLoop()Main execution method for the leaf Implementation requiredvoidsetParent(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 theTreeScriptparent of this Leaf- Returns:
- Tree parent of this leaf
-
getParent
public Branch getParent()
-
setParent
public void setParent(Branch parent)
-
-