I am using code to generate NPCs
NPCRegistry REGISTRY = CitizensAPI.createNamedNPCRegistry("ooci-lobby", new MemoryNPCDataStore());
String name = UUID.randomUUID().toString().split("-")[0];
NPC n = REGISTRY.createNPC(EntityType.PLAYER, name);
n.getOrAddTrait(Equipment.class).set(0, new ItemStack(Material.SPYGLASS));
n.getOrAddTrait(LookClose.class).lookClose(true);
