@molroo-ai/sdk
Preparing search index...
PluginHooks
Interface PluginHooks
Lifecycle hooks that plugins can implement to react to world operations.
interface
PluginHooks
{
onChat
?:
(
world
:
MolrooWorld
,
result
:
ChatResult
)
=>
Promise
<
void
>
;
onEvent
?:
(
world
:
MolrooWorld
,
result
:
EventResult
)
=>
Promise
<
void
>
;
onPhaseChange
?:
(
world
:
MolrooWorld
,
from
:
string
,
to
:
string
,
)
=>
Promise
<
void
>
;
onTick
?:
(
world
:
MolrooWorld
,
seconds
:
number
,
result
:
TickResult
,
)
=>
Promise
<
void
>
;
}
Index
Properties
on
Chat?
on
Event?
on
Phase
Change?
on
Tick?
Properties
Optional
on
Chat
onChat
?:
(
world
:
MolrooWorld
,
result
:
ChatResult
)
=>
Promise
<
void
>
Optional
on
Event
onEvent
?:
(
world
:
MolrooWorld
,
result
:
EventResult
)
=>
Promise
<
void
>
Optional
on
Phase
Change
onPhaseChange
?:
(
world
:
MolrooWorld
,
from
:
string
,
to
:
string
)
=>
Promise
<
void
>
Optional
on
Tick
onTick
?:
(
world
:
MolrooWorld
,
seconds
:
number
,
result
:
TickResult
,
)
=>
Promise
<
void
>
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Properties
on
Chat
on
Event
on
Phase
Change
on
Tick
@molroo-ai/sdk
Loading...
Lifecycle hooks that plugins can implement to react to world operations.