Skip to content

Event Titles

Package: com.hypixel.hytale.server.core.util.EventTitleUtil

Full-screen title/subtitle overlays with fade animations. Titles are queued — if one is already displaying, the next waits until it finishes. Used internally for zone discovery and instance entry.

ConstantValueDescription
DEFAULT_DURATION4.0sHow long the title stays visible
DEFAULT_FADE_DURATION1.5sFade in and fade out duration
// simple title with default timing
EventTitleUtil.showEventTitleToPlayer(
playerRef,
Message.translation("mymod.zone.entered"), // primary title
Message.translation("mymod.zone.name"), // secondary title
false // isMajor
);
// full control over timing and icon
EventTitleUtil.showEventTitleToPlayer(
playerRef,
Message.translation("mymod.boss.spawned"),
Message.translation("mymod.boss.name"),
true, // isMajor (larger/more prominent)
"Common/UI/Icons/BossSkull", // icon asset path
5.0f, // duration (seconds)
1.0f, // fade in (seconds)
2.0f // fade out (seconds)
);
// dismiss immediately
EventTitleUtil.hideEventTitleFromPlayer(playerRef, 0.0f);
// dismiss with fade out
EventTitleUtil.hideEventTitleFromPlayer(playerRef, 1.5f);
// all players in a world
EventTitleUtil.showEventTitleToWorld(
primary, secondary, isMajor, icon, duration, fadeIn, fadeOut, store
);
EventTitleUtil.hideEventTitleFromWorld(1.5f, store);
// all players on the server
EventTitleUtil.showEventTitleToUniverse(
primary, secondary, isMajor, icon, duration, fadeIn, fadeOut
);

The built-in zone and instance systems use event titles internally. Both fire cancellable events:

Zone discovery — fires when a player enters a new zone on the world map:

eventRegistry.registerGlobal(DiscoverZoneEvent.Display.class, event -> {
// event contains ZoneDiscoveryInfo:
// zoneName, regionName, icon, isMajor, duration, fadeIn, fadeOut,
// discoverySoundEventId
// cancel to suppress the title
event.setCancelled(true);
});

Instance discovery — fires when a player enters a new instance world:

eventRegistry.registerGlobal(DiscoverInstanceEvent.Display.class, event -> {
// contains InstanceDiscoveryConfig
event.setCancelled(true); // cancel the event entirely
// or just suppress the title display
event.setDisplay(false);
});

The EventTitle component can be toggled per-player via the HUD system:

// hide event titles for a player
hud.hideHudComponents(playerRef, HudComponent.EventTitle);

See ShowEventTitle and HideEventTitle for the wire format.

Notifications | Kill Feed | Custom HUD | HUD Components