Skip to content

PrepareUniverseEvent

Package: com.hypixel.hytale.server.core.event.events Implements: IEvent<Void> Cancellable: No

Deprecated. This event is deprecated and may be removed in a future version.

Dispatched during universe initialization to provide listeners with access to the world configuration provider. Listeners can use this event to inspect or mutate the WorldConfigProvider before worlds are created. The world config provider field is mutable, allowing listeners to replace the provider entirely.

AccessorReturn TypeDescription
getWorldConfigProvider()WorldConfigProviderReturns the current world configuration provider. Mutable — listeners may replace this value.
  • Dispatched by Universe.init (line 255) via the event bus during universe initialization. The event carries the WorldConfigProvider used to configure worlds in the universe.
getEventRegistry().register(PrepareUniverseEvent.class, event -> {
WorldConfigProvider provider = event.getWorldConfigProvider();
// Inspect or replace the world config provider before worlds are created
});
  • BootEvent — fires earlier in the server lifecycle, before universes are initialized.
  • ShutdownEvent — fires during server shutdown, after universes have been active.