mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-09-29 15:47:40 +02:00
Added onNPCSpawn method to Trait.
This commit is contained in:
parent
458efb9152
commit
1293c1f7fb
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user