|
RuneHive-Game
|
Sends game messages to all the online players. More...
Public Member Functions | |
| void | execute () |
| A function representing the unit of work that will be carried out. | |
| MessageEvent () | |
Constructs a new MessageEvent. | |
| Public Member Functions inherited from com.runehive.game.task.Task | |
| Task | attach (Object newKey) |
| Attaches a new key. | |
| synchronized final void | cancel () |
| Cancels all subsequent executions. | |
| synchronized final void | cancel (boolean logout) |
| Cancels all subsequent executions. | |
| boolean | canRun () |
| Determines if the task can be ran. | |
| Optional< Object > | getAttachment () |
| String | getCreationStackTraceStr () |
| int | getDelay () |
| Long | getElapsedTimeFromRunStartTime () |
| Optional< Long > | getRunStartTime () |
| long | getTaskCreationTime () |
| String | getTaskId () |
| boolean | isInstant () |
| boolean | isRunning () |
| void | setDelay (int delay) |
| Sets the cyclic delay. | |
| void | setExecutionTime () |
| Task (boolean instant, int delay) | |
Creates a new Task. | |
| Task (int delay) | |
Creates a new Task that doesn't execute instantly. | |
Private Attributes | |
| int | tick |
| The message randomevent ticks. | |
Additional Inherited Members | |
| Protected Member Functions inherited from com.runehive.game.task.Task | |
| void | baseExecute () |
| boolean | canSchedule () |
| A function executed on registration. | |
| void | onCancel (boolean logout) |
| A function executed on cancellation. | |
| void | onSchedule () |
| A function executed on registration. | |
| Package Functions inherited from com.runehive.game.task.Task | |
| void | onException (Exception e) |
| A function executed on thrown exceptions. | |
| void | onLoop () |
| A function executed when iterated over. | |
| final synchronized void | process () |
| synchronized void | setRunning (boolean running) |
Sends game messages to all the online players.
Definition at line 14 of file MessageEvent.java.
| com.runehive.game.task.impl.MessageEvent.MessageEvent | ( | ) |
Constructs a new MessageEvent.
Definition at line 20 of file MessageEvent.java.
| void com.runehive.game.task.impl.MessageEvent.execute | ( | ) |
A function representing the unit of work that will be carried out.
Reimplemented from com.runehive.game.task.Task.
Definition at line 26 of file MessageEvent.java.
References com.runehive.content.triviabot.TriviaBot.assign(), com.runehive.Config.MESSAGES, com.runehive.util.Utility.randomElement(), com.runehive.game.world.World.sendMessage(), and tick.
|
private |
The message randomevent ticks.
Definition at line 17 of file MessageEvent.java.
Referenced by execute().