Interface LifecycleEvent
public interface LifecycleEvent
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
LifecycleEvent.LevelState<T extends net.minecraft.world.level.Level>
static interface
static interface
-
Field Summary
Modifier 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'sFMLServerAboutToStartEvent
event and Fabric'sServerLifecycleEvents#SERVER_STARTING
. -
SERVER_STARTING
Invoked during server startup. Equivalent to Forge'sFMLServerStartingEvent
event. -
SERVER_STARTED
Invoked when the server has started and is ready to accept players. Equivalent to Forge'sFMLServerStartedEvent
event and Fabric'sServerLifecycleEvents#SERVER_STARTED
. -
SERVER_STOPPING
Invoked when the server begins shutting down. Equivalent to Forge'sFMLServerStoppingEvent
event and Fabric'sServerLifecycleEvents#SERVER_STOPPING
. -
SERVER_STOPPED
Invoked when the server has finished stopping, and is about to fully shut down. Equivalent to Forge'sFMLServerStoppedEvent
event and Fabric'sServerLifecycleEvents#SERVER_STOPPED
. -
SERVER_LEVEL_LOAD
Invoked when a level is loaded on the server-side. Equivalent to Forge'sWorldEvent.Load
event (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.Unload
event (on server) and Fabric'sServerWorldEvents#UNLOAD
.- See Also:
-
SERVER_LEVEL_SAVE
Invoked when the level is being saved. Equivalent to Forge'sWorldEvent.Save
event.- See Also:
-
SETUP
Invoked once common setup has begun.This happens during
FMLCommonSetupEvent
on 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.
-