public final class ServerWorldEvents extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ServerWorldEvents.Load |
static interface |
ServerWorldEvents.Unload |
| Modifier and Type | Field and Description |
|---|---|
static Event<ServerWorldEvents.Load> |
LOAD
Called when a world is loaded by a Minecraft server.
|
static Event<ServerWorldEvents.Unload> |
UNLOAD
Called before a world is unloaded by a Minecraft server.
|
public static final Event<ServerWorldEvents.Load> LOAD
For example, this can be used to load world specific metadata or initialize a PersistentState on a server world.
public static final Event<ServerWorldEvents.Unload> UNLOAD
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.