Add UUID fetching for portals still using owner name #12
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now, the plugin supports both owner name and owner UUID for portals. For new portals, UUID will be used, but for old ones, the UUID is never fetched to upgrade from player names to UUID.
A thread should be run after a delay of something like half an hour. It should try to fetch UUIDs of all portal owners which currently don't have a UUID. It should only be run once each time the server starts up. If found, UUID should be updated for the portals and a save should be performed.
It might be most efficient to get the missing UUIDs during portal loading.
The actual implementation became to store a map of all player names to migrate and a list of their owned portals. When a player joins, their name will be checked against the map and the name will be replaced by the player's UUID if necessary.