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

User identification: UUID only #1

Open
mbax opened this issue Jun 22, 2020 · 1 comment
Open

User identification: UUID only #1

mbax opened this issue Jun 22, 2020 · 1 comment

Comments

@mbax
Copy link
Member

mbax commented Jun 22, 2020

I propose that there be no interface accepting Player or OfflinePlayer so that this system is not "responsible" for any UUID lookups.

Specification should include allowing multiple types of UUID, e.g.

  • Type 4: Authenticated user
  • Type 3: Non-authenticated user
  • Type 2: Bot/NPC/other

Possible extension to this, providing an API for UUID generation that produces plugin-unique UUIDs, such as providing 64 bits of ID (double) and the rest generated based on the plugin name or some other string:

UUID createPluginUUID(Plugin plugin, double id);

Example functionality for this:

  • NPC economy accounts
  • Faction/Town/Guild accounts
  • Some sort of ephemeral account I don't know I'm sure there's something.
@mdcfe
Copy link
Member

mdcfe commented Jun 22, 2020

+1 to using UUIDs only and avoiding OfflinePlayer/Player - this frees us from being Bukkit-specific.

In addition to the UUID createPluginUUID(Plugin, double) helper API suggested above, @mbax also suggested a UUID createStringUUID(String, double) where the String is the namespace for flexibility (and createPluginUUID would call that method Plugin#getName on Bukkit etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants