-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Rework PlayerHead Getter. #1446
Rework PlayerHead Getter. #1446
Conversation
Generate player head based on WebAPI (as it is faster) and GameProfile texture (require NMS). Cache is suitable for storing into file format. Add ability to add custom HeadCache object into local cache. Add ability to modify cache keeping length. Add ability to keep all, or just a single element into cache until server restart.
src/main/java/world/bentobox/bentobox/util/heads/HeadCache.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this is really good. I am running it on the test server and I saw zero lag and no timings impact with it compared to the previous version which took avg of 264.92ms per. I recommend setting the cache to something big, like 1h or even longer. Thanks for this, we need this released asap to fix lag issue with Level.
src/main/java/world/bentobox/bentobox/util/heads/HeadGetter.java
Outdated
Show resolved
Hide resolved
- config will store time in minutes. - default value will be 1h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, BONNe.
@BONNe Please allow maintainers to edit this PR. I cannot solve the merge conflict manually. |
The funniest part is that I cannot give access, as isaacs/github#1681 :D |
Thanks for the PR! |
Generate player head based on WebAPI (as it is faster) and GameProfile texture (require NMS).
A cache is suitable for storing into a file format. Not implemented, but it is possible to do it.
Add the ability to add custom HeadCache object into the local cache.
Add the ability to modify cache keeping length.
Add the ability to keep all, or just a single element into cache until the server restart.
NMS will not require a version update each time, as GameProfile is in a package that does not use version number.