From e3ab44ae328a05f3ea775d634938d097c50c2b0c Mon Sep 17 00:00:00 2001 From: Phoenix616 Date: Wed, 23 Nov 2022 22:15:21 +0100 Subject: [PATCH] Don't fail account UUID checks on players that are online This should fix some issues with Floodgate which kept popping up --- src/main/java/com/Acrobot/ChestShop/UUIDs/NameManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/Acrobot/ChestShop/UUIDs/NameManager.java b/src/main/java/com/Acrobot/ChestShop/UUIDs/NameManager.java index 684c4fb..1109649 100644 --- a/src/main/java/com/Acrobot/ChestShop/UUIDs/NameManager.java +++ b/src/main/java/com/Acrobot/ChestShop/UUIDs/NameManager.java @@ -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());