|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Allows you to hook a Hookable event.
This interface is used by objects that wish to be able to hook into game events, to override them, modify them or simply react to them.
As an example, the Shop class implements much of its functionality using hooks. It prevents you from wielding, wearing, eating or otherwising using unpaid items by registering for the hooks for the "wield", "wear", "eat" (etc.) commands. If the target of the event is an unpaid item, the shop vetoes the event by calling the event's veto() method.
Method Summary | |
void |
hookEvent(java.lang.String hookName,
CommandEvent event)
Gives the HookCallback a chance to do something with the passed event. |
Method Detail |
public void hookEvent(java.lang.String hookName, CommandEvent event)
hookName
- the name of the hook, such as "movePreHook".event
- the CommandEvent encapsulating the event parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |