DiscoverZoneEvent
DiscoverZoneEvent
Section titled “DiscoverZoneEvent”Package:
com.hypixel.hytale.server.core.event.events.ecsExtends:EcsEventCancellable: No (base class) — see inner class below
ECS event dispatched when a player discovers a new zone in the world. The base class is not cancellable — zone discovery itself always proceeds. The Display inner class fires for the visual notification and can be cancelled to suppress the on-screen display.
Fields / Accessors (Base Class)
Section titled “Fields / Accessors (Base Class)”| Field | Type | Accessor | Mutable | Nullable |
|---|---|---|---|---|
discoveryInfo | WorldMapTracker.ZoneDiscoveryInfo | getDiscoveryInfo() | No | No |
- discoveryInfo — Contains information about the discovered zone, including zone identity and discovery metadata from the world map tracker.
Fired By
Section titled “Fired By”WorldMapTracker(line 148) viacomponentAccessor.invoke(ref, event)— ECS dispatch when a player enters and discovers a new zone.
DiscoverZoneEvent.Display
Section titled “DiscoverZoneEvent.Display”Extends:
DiscoverZoneEventImplements:ICancellableEcsEventCancellable: Yes
Fired after zone discovery to trigger the on-screen display notification. Cancelling this event suppresses the visual notification while the zone is still recorded as discovered.
Listening
Section titled “Listening”public class MyZoneDisplayHandler extends EntityEventSystem<EntityStore, DiscoverZoneEvent.Display> { @Override public Query<EntityStore> getQuery() { return MY_COMPONENT_TYPE; }
@Override public void handle(int index, ArchetypeChunk<EntityStore> chunk, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer, DiscoverZoneEvent.Display event) { WorldMapTracker.ZoneDiscoveryInfo info = event.getDiscoveryInfo();
// Example: suppress zone discovery popups during cutscenes if (isCutsceneActive()) { event.setCancelled(true); } }}
// Register in plugin setup():getEntityStoreRegistry().registerSystem(new MyZoneDisplayHandler());Listening (Base Class)
Section titled “Listening (Base Class)”To listen to all zone discoveries regardless of display:
public class MyZoneDiscoverHandler extends EntityEventSystem<EntityStore, DiscoverZoneEvent> { @Override public Query<EntityStore> getQuery() { return MY_COMPONENT_TYPE; }
@Override public void handle(int index, ArchetypeChunk<EntityStore> chunk, Store<EntityStore> store, CommandBuffer<EntityStore> commandBuffer, DiscoverZoneEvent event) { WorldMapTracker.ZoneDiscoveryInfo info = event.getDiscoveryInfo();
// Example: track zone discovery for achievements achievementTracker.onZoneDiscovered(info); }}
// Register in plugin setup():getEntityStoreRegistry().registerSystem(new MyZoneDiscoverHandler());Related Events
Section titled “Related Events”There are no directly related ECS events. Zone discovery is a standalone world exploration event.