Class ServerLifecycleEvents
java.lang.Object
net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents
public final class ServerLifecycleEvents extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ServerLifecycleEvents.EndDataPackReload
static interface
ServerLifecycleEvents.ServerStarted
static interface
ServerLifecycleEvents.ServerStarting
static interface
ServerLifecycleEvents.ServerStopped
static interface
ServerLifecycleEvents.ServerStopping
static interface
ServerLifecycleEvents.StartDataPackReload
-
Field Summary
Fields Modifier and Type Field Description static Event<ServerLifecycleEvents.EndDataPackReload>
END_DATA_PACK_RELOAD
Called after a Minecraft server has reloaded data packs.static Event<ServerLifecycleEvents.ServerStarted>
SERVER_STARTED
Called when a Minecraft server has started and is about to tick for the first time.static Event<ServerLifecycleEvents.ServerStarting>
SERVER_STARTING
Called when a Minecraft server is starting.static Event<ServerLifecycleEvents.ServerStopped>
SERVER_STOPPED
Called when a Minecraft server has stopped.static Event<ServerLifecycleEvents.ServerStopping>
SERVER_STOPPING
Called when a Minecraft server has started shutting down.static Event<ServerLifecycleEvents.StartDataPackReload>
START_DATA_PACK_RELOAD
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.
-