Closed J3fftw1 closed 8 months ago
Your Pull Request was automatically labelled as: "✨ Fix" Thank you for contributing to this project! ❤️
A Slimefun preview build is available for testing! Commit: 992a1229
https://preview-builds.walshy.dev/download/Slimefun/4134/992a1229
Note: This is not a supported build and is only here for the purposes of testing. Do not run this on a live server and do not report bugs anywhere but this PR!
Description
This PR fixes a dupe glitch with backpacks. There was a race condition in PlayerProfile where the UUID got removed from the loading map before it was finished loading and inserted into the Registry. This meant that the PlayerProfile could load twice if someone did something like spam open a backpack after joining. We now finish loading and adding to the registry before marking it as no longer loading.
Proposed changes
Move where we finish loading (remove from the loading map) to ensure we're always after the registry.
Related Issues (if applicable)
Fixes #4130 possibly fix for #4131
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values