mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-09-28 15:17:43 +02:00
Added onNPCSpawn method to Trait.
This commit is contained in:
parent
a21860a920
commit
2f59dd5f07
@ -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