AllNPCsLoadedEvent
Package:
com.hypixel.hytale.server.npcImplements:IEvent<Void>Cancellable: No
Standard event dispatched when all NPC builders have been loaded. Carries two maps of NPC builder info: the complete set of all NPCs and the subset that were successfully loaded. Both maps are returned as unmodifiable views.
Fields / Accessors
Section titled “Fields / Accessors”| Field | Type | Accessor | Mutable | Nullable |
|---|---|---|---|---|
allNPCs | Int2ObjectMap<BuilderInfo> | getAllNPCs() | No | No |
loadedNPCs | Int2ObjectMap<BuilderInfo> | getLoadedNPCs() | No | No |
- allNPCs — Unmodifiable map of all NPC builder info entries, keyed by integer ID.
- loadedNPCs — Unmodifiable map of successfully loaded NPC builder info entries, keyed by integer ID.
Fired By
Section titled “Fired By”Dispatch location not identified in decompiled source. This event may be dispatched by game modules not yet mapped.
Listening
Section titled “Listening”getEventRegistry().register(AllNPCsLoadedEvent.class, event -> { Int2ObjectMap<BuilderInfo> allNPCs = event.getAllNPCs(); Int2ObjectMap<BuilderInfo> loaded = event.getLoadedNPCs();
getLogger().info("Loaded " + loaded.size() + " of " + allNPCs.size() + " NPCs");});Related Events
Section titled “Related Events”LoadedNPCEvent— Fired individually for each NPC builder as it is loaded.