-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Rewrite User storage and UUID cache #4581
Conversation
|
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.
//noinspection ConstantConditions
Essentials/src/main/java/com/earth2me/essentials/userstorage/ModernUUIDCache.java
Outdated
Show resolved
Hide resolved
# Conflicts: # Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java
Always call ModernUserMap#getUser(Player) during join to ensure the fetched/created User object has the most up-to-date name on the underlying Player object. Additionally, ensure that ModernUUIDCache#updateCache is always called during #getUser and not just when we generate a new User object (which always never happens by the time the call is made 💀).
Used to create User objects based on player objects for use from when before Bukkit places the user into its own internal usermap. Without this, ModernUserMap#loadUncachedUser(UUID) would attempt to fetch the player from the server only to not return null because we first try to create a user during PlayerLoginEvent which is before Bukkit puts the player into its internal usermap.
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.
Side note: do we want an API interface for ModernUserMap
? Just so there's an explicit (and limited) set of methods that plugins should expect to use, otherwise I anticipate people will just call internal methods
Essentials/src/main/java/com/earth2me/essentials/EssentialsPlayerListener.java
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/api/Economy.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/economy/vault/VaultEconomyProvider.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/userstorage/ModernUUIDCache.java
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/userstorage/ModernUserMap.java
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/userstorage/ModernUserMap.java
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/userstorage/ModernUserMap.java
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/userstorage/ModernUserMap.java
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/commands/Commandessentials.java
Outdated
Show resolved
Hide resolved
Co-authored-by: triagonal <10545540+triagonal@users.noreply.github.com> Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
Co-authored-by: triagonal <10545540+triagonal@users.noreply.github.com> Co-authored-by: MD <1917406+mdcfe@users.noreply.github.com>
@JRoy Not entirely sure where to leave feedback for this but noticed that every time Citizens loads an npc (server restarts, teleporting around), Essentials spams creating a user for them. EssentialsX-2.20.0-dev+5 |
I had this issue and found it was caused by jail.yml having old data that was formatted in a different way than new jails. Since I don't actually use the jails, removing the file contents worked for me. |
A rewrite of user loading, user caching, uuid caching, and user memory management.
Closes #4512
Closes #4342
Closes #4566
Closes #4581
Technical Breakdown of
ModernUserMap
+ModernUUIDCache
TODO
Checklist;