#(evilcognac) saving npcs?

27 messages · Page 1 of 1 (latest)

foggy moon
#

npcRegistry = CitizensAPI.createNamedNPCRegistry("attackers",
new SimpleNPCDataStore(new YamlStorage(new File(this.getDataFolder(), "npcs.yml"))));

stone orbitBOT
#

(evilcognac) saving npcs?

stone orbitBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

foggy moon
#

the npcs.yml file is created

#

but when i restart the server the npcs arent there

#

do i need to save them somehow or what

gleaming cipher
foggy moon
gleaming cipher
#

Unfortunately not

#

But someone else might know a solution... best wait a bit and see

#

Im relatively new myself

foggy moon
#

ill just use the bukkit command sender ig

gleaming cipher
#

Good idea

foggy moon
#

huh /citizens save doesnt even work

#

its fine i have a different solution

gleaming cipher
#

Oh what 🤔 Might be a bug then?

broken skiff
#

Custom registries are not saved at the same time as the citizens registry

#

If you have a custom registry save file you need to manage that save file yourself

foggy moon
#

i mean i call this.npcRegistry.saveToStore();

#

still nothin'

broken skiff
#

You need to call yamlstorage.save() to flush to disk

foggy moon
#

aight

broken skiff
#

@foggy moon are you sure you want to save the npcs to another file anyway?

foggy moon
fickle frigateBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@foggy moon