Class ServerWorldEvents
java.lang.Object
net.fabricmc.fabric.api.event.lifecycle.v1.ServerWorldEvents
public final class ServerWorldEvents extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceServerWorldEvents.Loadstatic interfaceServerWorldEvents.Unload -
Field Summary
Fields Modifier and Type Field Description static Event<ServerWorldEvents.Load>LOADCalled when a world is loaded by a Minecraft server.static Event<ServerWorldEvents.Unload>UNLOADCalled before a world is unloaded by a Minecraft server. -
Method Summary
-
Field Details
-
LOAD
Called when a world is loaded by a Minecraft server.For example, this can be used to load world specific metadata or initialize a
PersistentStateon a server world. -
UNLOAD
Called before a world is unloaded by a Minecraft server.This typically occurs after a server has
started shutting down. Mods which allow dynamic world (un)registration should use this event so mods can let go of world handles when a world is removed.
-