Example #1
0
 /**
  * Removes an NPC from the Registry when removed from Citizens.
  *
  * @param event NPCRemoveEvent
  */
 @EventHandler
 public void onRemove(NPCRemoveEvent event) {
   NPC npc = event.getNPC();
   getDenizen(npc).action("remove", null);
   if (_isRegistered(npc)) {
     denizenNPCs.remove(npc.getId());
     npcInventories.remove(npc.getId());
   }
   FlagManager.clearNPCFlags(npc.getId());
 }
 @EventHandler
 public void onNPCRemove(NPCRemoveEvent evt) {
   processNPC(npcset, evt.getNPC());
 }