Interface GameplayHookHandler<R,V>
- Type Parameters:
R- the request typeV- the substituted value type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A scenario's answer to one gameplay decision point.
Handlers run on the server main thread, inside the game they were registered for, and are
dropped automatically when the scenario or the game ends. A handler that throws is isolated: the
exception is logged against the owning scenario and treated as HookOutcome.pass(), so one
broken scenario can never break the decision for anybody else.
- Since:
- 1.6.0
-
Method Summary
Modifier and TypeMethodDescription@NotNull HookOutcome<V> Decides what happens at this decision point.
-
Method Details
-
handle
Decides what happens at this decision point.- Parameters:
request- the request; mutable where the hook documents it as such- Returns:
- what to do, never null
-