Hi,
I am currently trying to write a plugin that uses the Citizen API to create NPCs.
I want to be able to despawn a NPC without destroying it. At the moment I use the despawn function and then call the saveToStore() function of the registry that holds the NPC data.
public static void despawnNPC(NPC npc){
npc.despawn();
npc.getOwningRegistry().saveToStore();
}
Sadyly it does not seem to write this into the saves.yml so after a server restart the NPC will spawn again.
Is it possible to persist the despawning?
Thank you for your help.