Package rs.kreme.ksbot.api.scripts
Class Script
- java.lang.Object
-
- rs.kreme.ksbot.api.scripts.Script
-
- All Implemented Interfaces:
Paintable
- Direct Known Subclasses:
TaskScript
public abstract class Script extends java.lang.Object implements Paintable
-
-
Constructor Summary
Constructors Constructor Description Script()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.io.File
getConfigFile()
Gets the configuration file for the script.ScriptManifest
getManifest()
Retrieves the script's manifest.java.io.File
getStorageDirectory()
Gets the storage directory for the script.boolean
loadConfig()
Loads the script's configuration.abstract int
onProcess()
Abstract method to be implemented with the script's main logic.boolean
onStart()
Called when the script starts.void
onStop()
Called when the script stops.
-
-
-
Field Detail
-
ctx
public final KSContext ctx
-
-
Method Detail
-
onStart
public boolean onStart()
Called when the script starts. Override for custom behavior.
-
onStop
public void onStop()
Called when the script stops. Override for custom behavior.
-
loadConfig
public boolean loadConfig()
Loads the script's configuration.
-
onProcess
public abstract int onProcess()
Abstract method to be implemented with the script's main logic.
-
getManifest
public final ScriptManifest getManifest()
Retrieves the script's manifest.
-
getConfigFile
public final java.io.File getConfigFile()
Gets the configuration file for the script.
-
getStorageDirectory
public final java.io.File getStorageDirectory()
Gets the storage directory for the script.
-
-