Class: WorldInitializeAfterEventSignal
Manages callbacks that are run on the first tick of the World. Do note that this event may run multiple times within a session in the case that the /reload command is used.
Constructors
new WorldInitializeAfterEventSignal()
private
new WorldInitializeAfterEventSignal():WorldInitializeAfterEventSignal
Returns
WorldInitializeAfterEventSignal
Methods
subscribe()
subscribe(
callback
): (arg
) =>void
Parameters
Parameter | Type |
---|---|
callback | (arg ) => void |
Returns
Function
Parameters
Parameter | Type |
---|---|
arg | WorldInitializeAfterEvent |
Returns
void
Remarks
Adds a callback that will be called when the scripting environment is initialized for a World.
This function can't be called in read-only mode.
unsubscribe()
unsubscribe(
callback
):void
Parameters
Parameter | Type |
---|---|
callback | (arg ) => void |
Returns
void
Remarks
Removes a callback from being called the scripting environment is initialized for a World.
This function can't be called in read-only mode.
Throws
This function can throw errors.