Added onNPCSpawn method to Trait.

This commit is contained in:
aPunch 2012-03-11 03:53:19 -05:00
parent a21860a920
commit 2f59dd5f07

View File

@ -131,6 +131,10 @@ public abstract class CitizensNPC extends AbstractNPC {
getTrait(SpawnLocation.class).setLocation(loc);
// Set the spawned state
getTrait(Spawned.class).setSpawned(true);
// Modify NPC using traits after the entity has been created
for (Trait trait : getTraits())
trait.onNPCSpawn();
return true;
}