Skip to content

Add API and Implementation for a Name to UUID Cache.#13

Closed
geNAZt wants to merge 2 commits into
PaperMC:masterfrom
geNAZt:master
Closed

Add API and Implementation for a Name to UUID Cache.#13
geNAZt wants to merge 2 commits into
PaperMC:masterfrom
geNAZt:master

Conversation

@geNAZt
Copy link
Copy Markdown

@geNAZt geNAZt commented Feb 3, 2016

Some bigger Networks have the problem of hitting the Mojang API Limit with multiple instances at once. The solution was to implement some sort of HTTP Proxy which always has been a pain. This implementation can use caching of any sort.

@Techcable
Copy link
Copy Markdown
Contributor

I don't like the usage of events, could we please use interfaces?

@geNAZt
Copy link
Copy Markdown
Author

geNAZt commented Feb 3, 2016

And how would you like to access those interfaces?

@Techcable
Copy link
Copy Markdown
Contributor

Server.setUUIDLookup(UUIDLookup lookup)

I think interfaces are more appropriate for this than events.

@geNAZt
Copy link
Copy Markdown
Author

geNAZt commented Feb 3, 2016

Ok i will implement something more generic since i have multiple caches which i will implement in PaperSpigot to a later point but i understand what you mean

+ * @param name of the player in any case (like given into {@link org.bukkit.inventory.meta.SkullMeta#setOwner(String)})
+ * @return the resolved uuid or null if the cache does not recognize this name
+ */
+ UUID resolve( String name );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An associated String resolveName(UUID) method would be nice (and rename this to resolveId).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use of the interface is internally and the only case i know is a Name => UUID resolve. A UUID => Name resolve would be nice for a open API like OfflinePlayer.getName()

@Techcable
Copy link
Copy Markdown
Contributor

@geNAZt
I'm working on an open API with a pluggable backend, based of the TechUtils UUID API.
I'd appriciate your help making this work with the UserCache once I'm done.

@geNAZt
Copy link
Copy Markdown
Author

geNAZt commented Feb 12, 2016

Sure. So this PR is closed until the new open API is developed and i can plug that into the UserCache?

@zachbr
Copy link
Copy Markdown
Contributor

zachbr commented Feb 13, 2016

I have not been following this closely enough to know what the status is. Are we wanting to do this, redo for some sort of backend, etc? Please advise.

@Techcable
Copy link
Copy Markdown
Contributor

@Zbob750
Im working on my own UUID api that would be avaliable to plugins.
It should be done soon, since I already have the API and lookup code.

@zachbr
Copy link
Copy Markdown
Contributor

zachbr commented Feb 15, 2016

Still a tad confused on the status but it seems that the consensus is "close this we'll work for something better". So I'll go ahead and close this, if that's not the case kick and scream for a minute and I'll re-open. Thanks for your time.

@zachbr zachbr closed this Feb 15, 2016
@Techcable Techcable mentioned this pull request Feb 18, 2016
@shuiqing2046 shuiqing2046 mentioned this pull request Jun 22, 2018
@successed successed mentioned this pull request Feb 25, 2019
@jason920612 jason920612 mentioned this pull request Aug 8, 2019
10 tasks
amit177 pushed a commit to amit177/Paper that referenced this pull request Dec 11, 2021
Turns out Java 9 is still borked btw, I tested it wrong, whoops
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

Successfully merging this pull request may close these issues.

4 participants