Events
Reacting to changes in the game.
Events are a highly efficient way of reacting to changes in the game engine, such as Npcs spawning and despawning, Skill level-ups, or Varps changing. RuneMate offers a variety of listeners that can be leveraged to this end.
Listeners
The EventListener interfaces can be implemented in order to react to various events in-game. For example, we can use the EngineListener to run some code every tick:
MyEngineListener.java
Event Dispatcher
The EventDispatcher is the core of the event framework, and all listeners must be registered with it. An instance of the EventDispatcher is provided by your bot instance:
MyBot.java
Last updated