Don't fail account UUID checks on players that are online

This should fix some issues with Floodgate which kept popping up
This commit is contained in:
Phoenix616 2022-11-23 22:15:21 +01:00
parent 9233064273
commit e3ab44ae32
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0

View File

@ -64,7 +64,7 @@ public class NameManager implements Listener {
*/
public static Account getOrCreateAccount(OfflinePlayer player) {
Preconditions.checkNotNull(player.getName(), "Name of player " + player.getUniqueId() + " is null?");
Preconditions.checkArgument(!(player instanceof Player) || !Properties.ENSURE_CORRECT_PLAYERID || uuidVersion < 0 || player.getUniqueId().version() == uuidVersion,
Preconditions.checkArgument(player instanceof Player || !Properties.ENSURE_CORRECT_PLAYERID || uuidVersion < 0 || player.getUniqueId().version() == uuidVersion,
"Invalid OfflinePlayer! " + player.getUniqueId() + " has version " + player.getUniqueId().version() + " and not server version " + uuidVersion + ". " +
"If you believe that is an error and your setup allows such UUIDs then set the ENSURE_CORRECT_PLAYERID config option to false.");
return getOrCreateAccount(player.getUniqueId(), player.getName());