Interface LifecycleEvent
public interface LifecycleEvent
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfaceLifecycleEvent.LevelState<T extends net.minecraft.world.level.Level>static interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Event<LifecycleEvent.ServerState>Invoked before initial server startup.static final Event<LifecycleEvent.ServerLevelState>Invoked when a level is loaded on the server-side.static final Event<LifecycleEvent.ServerLevelState>Invoked when the level is being saved.static final Event<LifecycleEvent.ServerLevelState>Invoked when a level is unloaded on the server-side.static final Event<LifecycleEvent.ServerState>Invoked when the server has started and is ready to accept players.static final Event<LifecycleEvent.ServerState>Invoked during server startup.static final Event<LifecycleEvent.ServerState>Invoked when the server has finished stopping, and is about to fully shut down.static final Event<LifecycleEvent.ServerState>Invoked when the server begins shutting down.Invoked once common setup has begun.
-
Field Details
-
SERVER_BEFORE_START
Invoked before initial server startup. This is the earliest point at which the server will be available. Equivalent to Forge'sFMLServerAboutToStartEventevent and Fabric'sServerLifecycleEvents#SERVER_STARTING. -
SERVER_STARTING
Invoked during server startup. Equivalent to Forge'sFMLServerStartingEventevent. -
SERVER_STARTED
Invoked when the server has started and is ready to accept players. Equivalent to Forge'sFMLServerStartedEventevent and Fabric'sServerLifecycleEvents#SERVER_STARTED. -
SERVER_STOPPING
Invoked when the server begins shutting down. Equivalent to Forge'sFMLServerStoppingEventevent and Fabric'sServerLifecycleEvents#SERVER_STOPPING. -
SERVER_STOPPED
Invoked when the server has finished stopping, and is about to fully shut down. Equivalent to Forge'sFMLServerStoppedEventevent and Fabric'sServerLifecycleEvents#SERVER_STOPPED. -
SERVER_LEVEL_LOAD
Invoked when a level is loaded on the server-side. Equivalent to Forge'sWorldEvent.Loadevent (on server) and Fabric'sServerWorldEvents#LOAD.- See Also:
-
SERVER_LEVEL_UNLOAD
Invoked when a level is unloaded on the server-side. Equivalent to Forge'sWorldEvent.Unloadevent (on server) and Fabric'sServerWorldEvents#UNLOAD.- See Also:
-
SERVER_LEVEL_SAVE
Invoked when the level is being saved. Equivalent to Forge'sWorldEvent.Saveevent.- See Also:
-
SETUP
Invoked once common setup has begun.This happens during
FMLCommonSetupEventon Forge, or when Architectury API's client/server entrypoint initialises on Fabric.Registries should have been initialised by this point, but there are no such guarantees, as you can modify the registry beyond this point on non-Forge environments.
-