public interface IBotHack
This represents a handle for the BotHack framework, through which you can register custom handlers, get the current game state etc.
Unlike other BotHack interfaces this is the only mutable one.
Modifier and Type | Method and Description |
---|---|
void |
deregisterHandler(Object handler)
Deregister a handler that was registered earlier.
|
IGame |
game()
Returns the current game state snapshot.
|
void |
registerHandler(Integer priority,
Object handler)
Register a custom handler with the specified priority.
|
void |
registerHandler(Object handler)
Register a custom handler with the default priority.
|
void |
replaceHandler(Object oldHandler,
Object newHandler)
Replace a handler that was registered earlier (with the same priority).
|
void registerHandler(Object handler)
handler
- The handler object should implement one or more interfaces
from bothack.events
or bothack.prompts
.void registerHandler(Integer priority, Object handler)
priority
- Lower number = processed earlier.handler
- The handler object should implement one or more interfaces
from bothack.events
or bothack.prompts
.void deregisterHandler(Object handler)
void replaceHandler(Object oldHandler, Object newHandler)
IllegalArgumentException
- if oldHandler is not registered.IGame game()