NPC Events
Packages:
com.hypixel.hytale.server.npccom.hypixel.hytale.server.spawning
Events related to NPC loading and management.
AllNPCsLoadedEvent
Section titled “AllNPCsLoadedEvent”Fired when all NPCs have finished loading.
Class: com.hypixel.hytale.server.npc.AllNPCsLoadedEvent
| Property | Value |
|---|---|
| Implements | IEvent<Void> |
| Async | No |
| Cancellable | No |
| KeyType | Void |
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
allNPCs | Int2ObjectMap<BuilderInfo> | Unmodifiable map of all NPC definitions |
loadedNPCs | Int2ObjectMap<BuilderInfo> | Unmodifiable map of NPCs that were loaded |
Methods
Section titled “Methods”| Method | Return Type | Description |
|---|---|---|
getAllNPCs() | Int2ObjectMap<BuilderInfo> | Returns the map of all NPC definitions |
getLoadedNPCs() | Int2ObjectMap<BuilderInfo> | Returns the map of loaded NPCs |
When Fired
Section titled “When Fired”Fired once during server startup after all NPC definitions have been loaded.
LoadedNPCEvent
Section titled “LoadedNPCEvent”Fired when a specific NPC is loaded.
Class: com.hypixel.hytale.server.spawning.LoadedNPCEvent
| Property | Value |
|---|---|
| Implements | IEvent<Void> |
| Async | No |
| Cancellable | No |
| KeyType | Void |
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
builderInfo | BuilderInfo | The builder info for the loaded NPC (must be spawnable) |
Methods
Section titled “Methods”| Method | Return Type | Description |
|---|---|---|
getBuilderInfo() | BuilderInfo | Returns the builder info for the loaded NPC |
When Fired
Section titled “When Fired”Fired for each NPC definition as it is loaded.