Skip to main content

Function: registerEditorExtension()

registerEditorExtension<PerPlayerStorageType>(extensionName, activationFunction, shutdownFunction, options?): Extension

Type parameters

Type parameterValue
PerPlayerStorageTypeRecord<string, never>

Parameters

ParameterType
extensionNamestring
activationFunctionActivationFunctionType<PerPlayerStorageType>
shutdownFunctionShutdownFunctionType<PerPlayerStorageType>
options?IRegisterExtensionOptionalParameters

Returns

Extension

Remarks

Registers an editor extension into Minecraft. This function calls underlying functionality to register an extension but provides helpful and contextual wrappers for individual client lifetimes. The onActivation function is called whenever a client joins a session, while the shutdown is called when a client leaves. There may be other circumstances in which these are called as well based on client state that is an implementation detail of the system.