API registration occurs in onEnable, and NPC loading also occurs in onEnable, before API registration. Because of this, NPCs are loaded first at startup, and an error occurs when attempting to find serializers for new action types.
Making the API available in onLoad will be quite problematic, so I suggest the following:
- Make on register hooks in NpcApiProvider.
NpcApiProvider.addOnRegisterHook(api -> ...)
- Make the API load BEFORE loading NPCs.