java.lang.Object
net.botwithus.rs3.script.Script
net.botwithus.rs3.script.TickingScript
- All Implemented Interfaces:
Runnable
,Consumer<ServerTickedEvent>
,ImmutableScript
,ItemInputProvider
,ItemOutputProvider
,ItemProvider
-
Constructor Summary
ConstructorDescriptionTickingScript
(String name, ScriptConfig config, ScriptDefinition scriptDefinition) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
accept
(@NotNull ServerTickedEvent event) final boolean
Initializes the script, this method loads the script configuration.void
boolean
abstract void
onTick
(LocalPlayer self) void
final void
run()
boolean
ticksElapsed
(long targetTicks) Methods inherited from class net.botwithus.rs3.script.Script
delay, delayUntil, delayUtil, getAuthor, getConfiguration, getDefinition, getDescription, getGraphicsContext, getInput, getLog, getName, getOutput, isActive, isBackgroundScript, isLocal, isPaused, onActivation, onPropertyChangeRequest, pause, print, print, print, print, println, println, println, resume, setActive, subscribe, syncConfig, uninitialize, unsubscribeAll
-
Constructor Details
-
TickingScript
-
-
Method Details
-
onInitialize
public boolean onInitialize() -
onTick
-
ticksElapsed
public boolean ticksElapsed(long targetTicks) -
initialize
public final boolean initialize()Description copied from class:Script
Initializes the script, this method loads the script configuration.- Overrides:
initialize
in classScript
- Returns:
- If the script should be active
-
onDeactivation
public void onDeactivation()- Overrides:
onDeactivation
in classScript
-
accept
- Specified by:
accept
in interfaceConsumer<ServerTickedEvent>
-
run
public final void run() -
onUninitialize
public void onUninitialize()- Overrides:
onUninitialize
in classScript
-