The StartupEvent interface in @minecraft/server.
Interface in @minecraft/server
import type { StartupEvent } from '@minecraft/server';Subscribe to it with system.beforeEvents.startup.
Example
Section titled “Example”import { system, type StartupEvent } from '@minecraft/server';
system.beforeEvents.startup.subscribe((event: StartupEvent) => { console.log('startup');});import { system } from '@minecraft/server';
system.beforeEvents.startup.subscribe((event) => { console.log('startup');});Properties
Section titled “Properties”customCommandRegistry
Section titled “customCommandRegistry”read-only
readonly customCommandRegistry: CustomCommandRegistry;Used by
Section titled “Used by”SystemBeforeEvents.startup, StartupBeforeEventSignal.subscribe, StartupBeforeEventSignal.unsubscribe