The plugin follows a specific lifecycle to ensure seamless integration:
- Setup Phase Name: Loads configuration and checks API key before assets are loaded.
- Asset Loading: Hytale loads NPC roles, including those cached from previous sessions.
- Start Phase: Connects to the backend via WebSocket, authenticates, and syncs NPCs from the dashboard.
- Runtime: Listens for events, routes messages to nearby NPCs, and executes AI actions.