Due to a logic bug in the Legacy storage backend if there was a duplicate ID it would mark it as researched for the first, then see it researched already and remove it on the second. This was happening for the Coal Generator and Bio Reactor here. Both shared he same research ID 173.
We're just doing this fix for now until we can move away from the legacy backend (work in progress).
* Move PlayerProfile off main thread, add debugs and improve tab completion for debug
Moved the PlayerProfile saving off the main thread, we generally load this off-thread but now we also save off-thread. I thought we were already doing this but apparently not, especially with our current YAML stuff this should definitely be done
Also done a small change to ensure that we don't remove the PlayerProfile from memory if the player is still online. I don't think we ever had a reported issue from this but it's kinda weird behaviour
Finally, added some debug logs to the saving logic, this can be enabled with `sf debug slimefun_player_profile_data`. Also added auto-complete to /sf debug because it's nice, this only works for Slimefun test cases rather than addons but that's fine. Mostly internal anyway
* Update src/main/java/io/github/thebusybiscuit/slimefun4/api/player/PlayerProfile.java
---------
Co-authored-by: Alessio Colombo <37039432+Sfiguz7@users.noreply.github.com>
When a block is broken we don't want to allow users to still use the inventory. This allows for them to pull items out along with blocks being dropped (if the block implements that).
This fix is in 2 parts, the main part is just preventing the inventory from being opened if the block is queued for deletion. The second smaller part is just closing the inventory for all viewers on break. We would do this during cleanup but that was a tick later, we want it done in this tick and to prevent opening before the cleaning up is ran.
* Phase 1 - wip
* Add some tests
* wip
* Save waypoints
* Implement backpacks
* Add tests for waypoints
* Changes to ADR
* Small changes
* Fix englandish and some small changes to UUID in PlayerProfile
* Fix saving of player data in a few cases
* Documentation around deprecated
* Add some more tests
* Some small doc updates
* Make old Waypoint constructor deprecated and fix javadocs