The cache was not cleared, meaning that if you rejoined a world, the mod would still take from the cache, and crash the logical server because it's invalid.
Also implemented the unload world listener to prevent memory leak
QA Instructions, Screenshots, Recordings
load a singleplayer world
do snipe actions
leave and load again
do snipe actions
see that it works
Added/updated tests?
[ ] Yes
[ ] No, and this is why: please replace this line with details on why tests
have not been included
[ ] I need help with writing tests
[x] Not needed
[optional] What gif best describes this PR or how it makes you feel?
LGTM, but just a thought, shouldn't we also remove Players when they leave? Doesn't look like we are doing that on Forge (although it does any matter for servers)
What type of PR is this? (check all applicable)
Description
The cache was not cleared, meaning that if you rejoined a world, the mod would still take from the cache, and crash the logical server because it's invalid.
Also implemented the unload world listener to prevent memory leak
QA Instructions, Screenshots, Recordings
Added/updated tests?
[optional] What gif best describes this PR or how it makes you feel?