Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace UserDiscoverer with stripped back ServerUserProvider. #3067

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

dualspiral
Copy link
Contributor

The idea of the UserManager is to manage User objects, not GameProfiles. While we do some operations with GameProfiles, they mirror what Users we think have been created - we're not caching GameProfiles.

The file system watching is in, but all GameProfile caching is delegated to the PlayerProfileCache, which we just get profiles from when required.

It needs some testing, but it seems to at least grab the right user file and I can see it stores the UUIDs of the files that exist - which is the point really.

Note that I have not brought over the notion that banned/whitelisted profiles necessarily have a User attached - they don't! If you want a users associated with a banned player, get the banned user's profile and create it.

Closes #3059

@dualspiral dualspiral added status: needs testing does this run, does it solve the issue etc version: 1.16 (u) API: 8 labels Jul 15, 2020
@dualspiral dualspiral self-assigned this Jul 15, 2020
@dualspiral dualspiral marked this pull request as ready for review July 15, 2020 21:03
@dualspiral dualspiral force-pushed the api8/userdiscoverer branch from 54449d5 to aa6dd44 Compare July 16, 2020 20:20
@dualspiral dualspiral force-pushed the api8/userdiscoverer branch from 47f3415 to a1cf23b Compare July 17, 2020 19:30
The idea of the UserManager is to manage User objects, not GameProfiles. While we do some operations with GameProfiles, they mirror what Users we think have been created.

The file system watching is in, but all GameProfile caching is delegated to the PlayerProfileCache, which we just get profiles from when required.

* Save the username cache json when we save the worlds
* Add stream methods to GameProfileCache
* Create UUID only GameProfiles for files that don't have an associated profile during the stream methods
@dualspiral dualspiral force-pushed the api8/userdiscoverer branch from a1cf23b to a6297e3 Compare July 17, 2020 19:39
@dualspiral dualspiral merged commit a6297e3 into api-8 Jul 17, 2020
@dualspiral dualspiral deleted the api8/userdiscoverer branch July 17, 2020 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs testing does this run, does it solve the issue etc version: 1.16 (u) API: 8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants