Added onNPCSpawn method to Trait.

This commit is contained in:
aPunch 2012-03-11 03:53:19 -05:00
parent 458efb9152
commit 1293c1f7fb

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;
}