private void init() {
        // create npc registry
        this.npcRegistry = CitizensAPI.createNamedNPCRegistry("helper", new MemoryNPCDataStore());

        // ensure our trait is registered
        registerTrait();

        // handle click events
        Events.merge(NPCClickEvent.class, NPCRightClickEvent.class, NPCLeftClickEvent.class)
                .handler(e -> handleClick(e.getNPC(), e.getClicker())).bindWith(this.registry);

        // don't let players move npcs
        Events.subscribe(PlayerFishEvent.class)
                .filter(e -> e.getCaught() != null)
                .filter(e -> isHelperNpc(e.getCaught()))
                .handler(e -> e.setCancelled(true))
                .bindWith(this.registry);

        /* Events.subscribe(ProjectileCollideEvent.class)
                .filter(e -> e.getCollidedWith() != null)
                .filter(e -> isHelperNpc(e.getCollidedWith()))
                .handler(e -> e.setCancelled(true))
                .bindWith(this.registry); */

        Events.subscribe(EntityDamageByEntityEvent.class)
                .filter(e -> isHelperNpc(e.getEntity()))
                .handler(e -> e.setCancelled(true))
                .bindWith(this.registry);

        // update npcs every 10 ticks
        Schedulers.sync().runRepeating(this::tickNpcs, 10L, 10L).bindWith(this.registry);
    }
Implementation of {@link NpcFactory} using Citizens.
helper/src/main/java/me/lucko/helper/npc/CitizensNpcFactory.java