Search in sources :

Example 1 with NPCEntitySpawnEvent

use of com.magmaguy.elitemobs.api.NPCEntitySpawnEvent in project EliteMobs by MagmaGuy.

the class EntityTracker method registerNPCEntity.

public static void registerNPCEntity(NPCEntity npc) {
    NPCEntitySpawnEvent npcEntitySpawnEvent = new NPCEntitySpawnEvent(npc.getVillager(), npc);
    new EventCaller(npcEntitySpawnEvent);
    if (npcEntitySpawnEvent.isCancelled())
        return;
    npcEntities.put(npc.getUuid(), npc);
    PersistentTagger.tagNPC(npc.getVillager(), npc.getUuid());
}
Also used : NPCEntitySpawnEvent(com.magmaguy.elitemobs.api.NPCEntitySpawnEvent) EventCaller(com.magmaguy.elitemobs.utils.EventCaller)

Aggregations

NPCEntitySpawnEvent (com.magmaguy.elitemobs.api.NPCEntitySpawnEvent)1 EventCaller (com.magmaguy.elitemobs.utils.EventCaller)1