Closed test414EFF closed 4 years ago
I tried printing FLATFILE.getFileData().toMap().toString() to console after creating a new shop - this just resulted in the file being printed out without the new shop. Upon reload, the correct file was printed.
Hi 414Eff,
thank you for reporting this!
Can you tell me which line exactly is not working, please?
Direct fix: (Until the next release) Just use forceReload()
Regards,
Specifically, it's this line:
[24] return Bukkit.getOfflinePlayer(UUID.fromString(shops.getString(name + ".info.owner"))).getName();
I will have a look soon
I have done extensive testing & cant reproduce the issue.
Anything new?
Oh, sorry - I could have sworn that I saw a comment saying you had found the issue earlier... I'm not too sure - the plugin that I was having this issue with is currently being rewritten. I can't see why one json file would work and the other wouldn't, so perhaps it was my own error (though I did print the file to console as you suggested and it showed the outdated file before reloading).
I think it would be safe to close the issue, and I can either reopen this issue, or open a new issue, if the problem occurs again.
Describe the bug My shops file doesn't seem to be updated automatically even when my accounts file is. Everything works as intended after I either restart the server or do /reload.
To Reproduce My shop storage class: https://gist.github.com/test414EFF/6656433ce12c8f6e9912c4060393f52a
Expected behavior Both JSON files should be updated without having to reload the server.
Additional context JSON file: https://gist.github.com/test414EFF/ffa5a20d23b632db19ce3eaa799281f3