Skip to content

NPC Events

Packages:

  • com.hypixel.hytale.server.npc
  • com.hypixel.hytale.server.spawning

Events related to NPC loading and management.


Fired when all NPCs have finished loading.

Class: com.hypixel.hytale.server.npc.AllNPCsLoadedEvent

PropertyValue
ImplementsIEvent<Void>
AsyncNo
CancellableNo
KeyTypeVoid
FieldTypeDescription
allNPCsInt2ObjectMap<BuilderInfo>Unmodifiable map of all NPC definitions
loadedNPCsInt2ObjectMap<BuilderInfo>Unmodifiable map of NPCs that were loaded
MethodReturn TypeDescription
getAllNPCs()Int2ObjectMap<BuilderInfo>Returns the map of all NPC definitions
getLoadedNPCs()Int2ObjectMap<BuilderInfo>Returns the map of loaded NPCs

Fired once during server startup after all NPC definitions have been loaded.


Fired when a specific NPC is loaded.

Class: com.hypixel.hytale.server.spawning.LoadedNPCEvent

PropertyValue
ImplementsIEvent<Void>
AsyncNo
CancellableNo
KeyTypeVoid
FieldTypeDescription
builderInfoBuilderInfoThe builder info for the loaded NPC (must be spawnable)
MethodReturn TypeDescription
getBuilderInfo()BuilderInfoReturns the builder info for the loaded NPC

Fired for each NPC definition as it is loaded.