CitizensDev / Citizens2

Citizens - the premier plugin and API for creating server-side NPCs in Minecraft.
https://citizensnpcs.co
Open Software License 3.0
583 stars 313 forks source link

Command "/citizens save" won't save last npc list after some tricks #1455

Closed Qveshn closed 6 years ago

Qveshn commented 6 years ago

Spigot 1.12.2 citizens 2.0.22 build #1524 Commands "/citizens save|reload" + "/npc create|remove" = confusion! Result: "/citizens save" won't save last npc list How to reproduce: Install clean plugin (remove folder Citizens) Start server

  1. /npc create steve
  2. /citizens save
  3. /citizens reload
  4. /npc sel (optionaly, because it will say:"You already have that npc selected.")
  5. /npc remove
  6. /citizens save
  7. /citizens reload What do you expect? No npc? Ha-ha! Steve will come back! After last save plugin wrote to file previos data (before steve removing) Try again remove npc and save citizens - no effect! File saves.yml still has get Steve data!
mcmonkey4eva commented 6 years ago

the save/reload issue is common when you have corrupt data and saving failed or operated in some odd way also can be connected to other plugins borking with entities

If this happened on a "clean" server - it likely wasn't so clean as you thought. A clean server is "clean" if it was made from scratch with a fresh copy of the latest Spigot jar and a Citizens jar and the rest was allowed to generate.

Qveshn commented 6 years ago

So it was I installed latest build of spigot 1.12.2 and latest build citezens. Spigot: "name": "1536", "description": "Jenkins build 1536", "refs": { "BuildData": "a9c4523879abc011821f06283dd468c67c3b0097", "Bukkit": "bf61ffc26b4845816da86e9ce53c29b7263fb7a7", "CraftBukkit": "29705a0d4f65440b4d91cba67d63bbac884a833e", "Spigot": "c3093efafc5eab1ea62a8a57aa47f28f5ea85d03" }, "toolsVersion": 47

Citizens: 2.0.22 build #1524

There are no more plugins! Only spigot and citizens. Spigot was installed in new folder and all rest data (regions and so on) was generated

Can I say that this is clean server?

mcmonkey4eva commented 6 years ago

Yup! Going to do some local testing to see if I can reproduce any issue in a moment.

mcmonkey4eva commented 6 years ago

I have fixed this in https://github.com/CitizensDev/CitizensAPI/commit/ac5c649c2fed6736e4649d1cc2d31a3b55b54b16 and https://github.com/CitizensDev/Citizens2/commit/acb50f6a5022503e540c45d7578d151c96e8c22e

Fix is available in Build-1525+ on http://ci.citizensnpcs.co/job/Citizens2/

Thanks for reporting this issue!

Please confirm the fix works for your server and reply (and/or close the issue) when you've done so! (Or reply if something went wrong in the patch).

Qveshn commented 6 years ago

I have tested. I did steps from first comment - OK! I did more complicated steps - OK! I can't find any erros. Let's think bug is fixed. Thanks =)

Qveshn commented 6 years ago

Sorry, I have closed issue! I reopened it! I don't know who must close issue =(

mcmonkey4eva commented 6 years ago

If an issue is solved, you close it, lol.

Qveshn commented 6 years ago

Ok =)

Obseline commented 12 months ago

Up, same problem on version 1.20.1 with Citizens-2.0.32-b3208.jar

Data are not saving after doing /citizens save

mcmonkey4eva commented 12 months ago

Not same problem as one that happened 5 years ago - please open your own issue report or ask on Discord https://discord.gg/Q6pZGSR