if (loc != null)
created.getCitizen().spawn(loc);
if (traits != null) {
for (String trait_name : traits) {
Trait trait = CitizensAPI.getTraitFactory().getTrait(trait_name);
if (trait != null)
created.getCitizen().addTrait(trait);
else
dB.echoError(scriptEntry.getResidingQueue(), "Could not add trait to NPC: " + trait_name);
}