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

Player Offline/Online State Utility #44

Open
The-Fireplace opened this issue Feb 13, 2022 · 0 comments
Open

Player Offline/Online State Utility #44

The-Fireplace opened this issue Feb 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@The-Fireplace
Copy link
Member

Is your feature request related to a problem? Please describe.
When users switch between online and offline mode, their UUID changes, and that often creates problems for saved data which was created in the other mode.

Describe the solution you'd like
An API for:

  1. Determining the current online/offline state
  2. Determining the online UUID of a player from the offline UUID, and vice versa
  3. Providing an event/entrypoint that fires when FL determines that the state has changed, which mods can use to update their data accordingly.

Additional context
Considerations:

  • State change may need to be tracked on a per-mod basis for compatibility reasons. If a mod is removed, the state changes, then it is later added, we don't want that to break that mod's existing data.
  • State tracking per-mod would need an UNDETERMINED status as well, for mods that had data from before they used state tracking. Possibly have those mods input their list of known player IDs from their data and see if they map to any known players' online/offline IDs to get out of UNDETERMINED state.
  • How does Minecraft's built in GameProfile cache work? We may be able to grab some useful initial online/offline data from that
  • We'll probably need to build a cache from Fireplace Lib containing Online UUID, Offline UUID(s?), and last known Player Name for each player for easy conversion purposes.
  • This will most likely require some degree of guesswork for existing data and careful consideration of how to handle data that is unknown or can't be automatically converted when the event is fired (such as player IDs stored in the world or entity NBT)
@The-Fireplace The-Fireplace added the enhancement New feature or request label Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant