RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
com.osroyale.game.task.Task Class Referenceabstract

Inherited by com.osroyale.content.activity.inferno.InfernoBoss, com.osroyale.content.bloodmoney.BloodChestEvent, com.osroyale.content.combat.cannon.CannonFireAction, com.osroyale.content.lms.LMSGameEvent, com.osroyale.content.lms.lobby.LMSLobbyEvent, com.osroyale.content.skill.impl.hunter.net.Netting, com.osroyale.game.action.Action< T extends Mob >, com.osroyale.game.action.impl.DebugAction, com.osroyale.game.action.impl.HunterRespawnTask, com.osroyale.game.task.TickableTask, com.osroyale.game.task.impl.AntiVenomTask, com.osroyale.game.task.impl.ChopVineTask, com.osroyale.game.task.impl.DoubleExperienceEvent, com.osroyale.game.task.impl.DuelNotificationTask, com.osroyale.game.task.impl.ForceChatEvent, com.osroyale.game.task.impl.ForceMovementTask, com.osroyale.game.task.impl.HunterTask, com.osroyale.game.task.impl.MessageEvent, com.osroyale.game.task.impl.ObjectPlacementEvent, com.osroyale.game.task.impl.ObjectReplacementEvent, com.osroyale.game.task.impl.PlayerSaveEvent, com.osroyale.game.task.impl.PvPTimerTask, com.osroyale.game.task.impl.SessionRemovalNotificationTask, com.osroyale.game.task.impl.SteppingStoneTask, com.osroyale.game.task.impl.SuperAntipoisonTask, com.osroyale.game.task.impl.TeleblockTask, com.osroyale.game.task.impl.WarriorGuildCyclopEvent, , com.osroyale.game.world.entity.combat.strategy.npc.boss.skotizo.SkotizoEvent, com.osroyale.game.world.entity.mob.MobDeath< T extends Mob >, and com.osroyale.game.world.entity.mob.movement.waypoint.Waypoint.

Public Member Functions

 Task (boolean instant, int delay)
 Task (int delay)
boolean canRun ()
synchronized final void cancel ()
synchronized final void cancel (boolean logout)
Task attach (Object newKey)
boolean isInstant ()
int getDelay ()
void setDelay (int delay)
boolean isRunning ()
Optional< Object > getAttachment ()

Protected Member Functions

abstract void execute ()
void onSchedule ()
boolean canSchedule ()
void onCancel (boolean logout)

Detailed Description

A game representing a cyclic unit of work.

Author
lare96 http://github.org/lare96

Definition at line 45 of file Task.java.

Constructor & Destructor Documentation

◆ Task() [1/2]

com.osroyale.game.task.Task.Task ( boolean instant,
int delay )
inline

Creates a new Task.

Definition at line 75 of file Task.java.

◆ Task() [2/2]

com.osroyale.game.task.Task.Task ( int delay)
inline

Creates a new Task that doesn't execute instantly.

Definition at line 92 of file Task.java.

Member Function Documentation

◆ attach()

Task com.osroyale.game.task.Task.attach ( Object newKey)
inline

Attaches a new key.

Definition at line 182 of file Task.java.

◆ cancel() [1/2]

synchronized final void com.osroyale.game.task.Task.cancel ( )
inline

Cancels all subsequent executions. Does nothing if already cancelled.

Definition at line 147 of file Task.java.

◆ cancel() [2/2]

synchronized final void com.osroyale.game.task.Task.cancel ( boolean logout)
inline

Cancels all subsequent executions. Does nothing if already cancelled.

Definition at line 155 of file Task.java.

◆ canRun()

boolean com.osroyale.game.task.Task.canRun ( )
inline

◆ canSchedule()

◆ execute()

abstract void com.osroyale.game.task.Task.execute ( )
abstractprotected

A function representing the unit of work that will be carried out.

Reimplemented in com.osroyale.content.activity.inferno.InfernoBoss, com.osroyale.content.bloodmoney.BloodChestEvent, com.osroyale.content.combat.cannon.CannonFireAction, com.osroyale.content.lms.LMSGameEvent, com.osroyale.content.lms.lobby.LMSLobbyEvent, com.osroyale.content.skill.impl.fishing.FishingAction, com.osroyale.content.skill.impl.hunter.net.Netting, com.osroyale.content.skill.impl.mining.MiningAction, com.osroyale.content.skill.impl.thieving.PickpocketAction, com.osroyale.content.skill.impl.woodcutting.WoodcuttingAction, com.osroyale.content.skill.SkillAction, com.osroyale.content.wintertodt.actions.FeedBrazier, com.osroyale.content.wintertodt.actions.FletchKindling, com.osroyale.game.action.impl.ChestAction, com.osroyale.game.action.impl.DebugAction, com.osroyale.game.action.impl.DoorAction, com.osroyale.game.action.impl.EmoteAction, com.osroyale.game.action.impl.FlaxPickingAction, com.osroyale.game.action.impl.HunterRespawnTask, com.osroyale.game.action.impl.LadderAction, com.osroyale.game.action.impl.NpcFaceAction, com.osroyale.game.action.impl.SpadeAction, com.osroyale.game.action.impl.SpellAction, com.osroyale.game.task.impl.AntiVenomTask, com.osroyale.game.task.impl.ChopVineTask, com.osroyale.game.task.impl.DoubleExperienceEvent, com.osroyale.game.task.impl.DuelNotificationTask, com.osroyale.game.task.impl.ForceChatEvent, com.osroyale.game.task.impl.ForceMovementTask, com.osroyale.game.task.impl.HunterTask, com.osroyale.game.task.impl.MessageEvent, com.osroyale.game.task.impl.ObjectPlacementEvent, com.osroyale.game.task.impl.ObjectReplacementEvent, com.osroyale.game.task.impl.PlayerSaveEvent, com.osroyale.game.task.impl.PvPTimerTask, com.osroyale.game.task.impl.SessionRemovalNotificationTask, com.osroyale.game.task.impl.SteppingStoneTask, com.osroyale.game.task.impl.SuperAntipoisonTask, com.osroyale.game.task.impl.TeleblockTask, com.osroyale.game.task.impl.WarriorGuildCyclopEvent, com.osroyale.game.task.TickableTask, com.osroyale.game.world.entity.combat.strategy.npc.boss.skotizo.SkotizoEvent, com.osroyale.game.world.entity.mob.MobDeath< T extends Mob >, com.osroyale.game.world.entity.mob.movement.waypoint.Waypoint, and com.osroyale.game.world.items.ground.GroundItemEvent.

◆ getAttachment()

Optional< Object > com.osroyale.game.task.Task.getAttachment ( )
inline
Returns
An optional attachment.

Definition at line 208 of file Task.java.

◆ getDelay()

int com.osroyale.game.task.Task.getDelay ( )
inline
Returns
The cyclic delay.

Definition at line 193 of file Task.java.

◆ isInstant()

boolean com.osroyale.game.task.Task.isInstant ( )
inline
Returns
true if execution happens instantly upon being scheduled.

Definition at line 188 of file Task.java.

◆ isRunning()

boolean com.osroyale.game.task.Task.isRunning ( )
inline
Returns
true if registration has taken place.

Definition at line 203 of file Task.java.

◆ onCancel()

void com.osroyale.game.task.Task.onCancel ( boolean logout)
inlineprotected

A function executed on cancellation.

Reimplemented in com.osroyale.content.combat.cannon.CannonBuild, com.osroyale.content.mysterybox.MysteryBoxEvent, com.osroyale.content.skill.impl.firemaking.FiremakingAction, com.osroyale.content.skill.impl.fishing.FishingAction, com.osroyale.content.skill.impl.hunter.net.Netting, com.osroyale.content.skill.impl.mining.MiningAction, com.osroyale.content.skill.impl.smithing.SmithingArmour, com.osroyale.content.skill.impl.woodcutting.WoodcuttingAction, com.osroyale.game.action.impl.BuryBoneAction, com.osroyale.game.action.impl.ChestAction, com.osroyale.game.action.impl.DoorAction, com.osroyale.game.action.impl.LadderAction, com.osroyale.game.action.impl.ScatterAshAction, com.osroyale.game.task.impl.AntiVenomTask, com.osroyale.game.task.impl.CeillingCollapseTask, com.osroyale.game.task.impl.ChopVineTask, com.osroyale.game.task.impl.DoubleExperienceEvent, com.osroyale.game.task.impl.DuelNotificationTask, com.osroyale.game.task.impl.HunterTask, com.osroyale.game.task.impl.ObjectPlacementEvent, com.osroyale.game.task.impl.ObjectReplacementEvent, com.osroyale.game.task.impl.PlayerRemovalTask, com.osroyale.game.task.impl.PvPTimerTask, com.osroyale.game.task.impl.SessionRemovalNotificationTask, com.osroyale.game.task.impl.SteppingStoneTask, com.osroyale.game.task.impl.SuperAntipoisonTask, com.osroyale.game.task.impl.SystemUpdateEvent, com.osroyale.game.task.impl.TeleblockTask, com.osroyale.game.task.impl.WarriorGuildCyclopEvent, com.osroyale.game.world.entity.mob.MobDeath< T extends Mob >, com.osroyale.game.world.entity.mob.movement.waypoint.Waypoint, and com.osroyale.game.world.items.ground.GroundItemEvent.

Definition at line 174 of file Task.java.

◆ onSchedule()

◆ setDelay()

void com.osroyale.game.task.Task.setDelay ( int delay)
inline

Sets the cyclic delay.

Definition at line 198 of file Task.java.


The documentation for this class was generated from the following file: