aPunch/Citizens2 — Issue #1: Citizens API and layout
Author: tips48
Created: 2011-11-16 15:22:16+00:00
State: open

So, as for CItizens, heres how I think a basic layout could work:
* BasicNPC ~ Default NPC, does all of the basic interaction with NPCLib.
* NPCManager ~ Kind of like the Plugin Manager in Bukkit. Enables, disables, and stores custom NPC's that extend BasicNPC, as well as NPCs actual instance.
* NPCData (or something similar) ~ Persistance manager for NPCs.

Then, to create a custom NPC, you extend BasicNPC, override methods, add your own, add your own custom events, etc.

API:
Custom events:
* NPCCreateEvent(BasicNPC npc)
* NPCDamageEvent(BasicNPC npc, int damager, LivingEntity damager)
* NPCPathFindEvent(BasicNPC npc, Location to, Location from)
* NPCChatEvent(BasicNPC npc, Location to, Location from)
* NPCDeathEvent(BasicNPC npc, DeathReason reason)
* NPCDespawnEvent(BasicNPC npc, DespawnReason reason)
And everything else would go through NPCManager.