Class ServerLifecycleEvents
java.lang.Object
net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
static interface
static interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Event<ServerLifecycleEvents.EndDataPackReload>
Called after a Minecraft server has reloaded data packs.static final Event<ServerLifecycleEvents.ServerStarted>
Called when a Minecraft server has started and is about to tick for the first time.static final Event<ServerLifecycleEvents.ServerStarting>
Called when a Minecraft server is starting.static final Event<ServerLifecycleEvents.ServerStopped>
Called when a Minecraft server has stopped.static final Event<ServerLifecycleEvents.ServerStopping>
Called when a Minecraft server has started shutting down.static final Event<ServerLifecycleEvents.StartDataPackReload>
Called before a Minecraft server reloads data packs. -
Method Summary
-
Field Details
-
SERVER_STARTING
Called when a Minecraft server is starting.This occurs before the
player manager
and any worlds are loaded. -
SERVER_STARTED
Called when a Minecraft server has started and is about to tick for the first time.At this stage, all worlds are live.
-
SERVER_STOPPING
Called when a Minecraft server has started shutting down. This occurs before the server's network channel is closed and before any players are disconnected.For example, an integrated server will begin stopping, but it's client may continue to run.
All worlds are still present and can be modified.
-
SERVER_STOPPED
Called when a Minecraft server has stopped. All worlds have been closed and all (block)entities and players have been unloaded.For example, an
integrated server
will begin stopping, but it's client may continue to run. Meanwhile for adedicated server
, this will be the last event called. -
START_DATA_PACK_RELOAD
Called before a Minecraft server reloads data packs. -
END_DATA_PACK_RELOAD
Called after a Minecraft server has reloaded data packs.If reloading data packs was unsuccessful, the current data packs will be kept.
-