From 9804f7ffe13d3ec0d019ea0f36bbf0b03e8dd3de Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 18 Aug 2024 15:32:25 -0700 Subject: [PATCH] Use player file, not directory, when checking for offline player data When trying to fall back to offline player data in onlide mode, we need to use the player file. This fixes a mistake during update where 'file' was used, but the new code uses 'file1' for the player file. --- .../Check-online-mode-before-converting-and-renaming-pla.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/Check-online-mode-before-converting-and-renaming-pla.patch b/patches/server/Check-online-mode-before-converting-and-renaming-pla.patch index 6c4dc7fdb5..3be18e48c1 100644 --- a/patches/server/Check-online-mode-before-converting-and-renaming-pla.patch +++ b/patches/server/Check-online-mode-before-converting-and-renaming-pla.patch @@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // Spigot Start boolean usingWrongFile = false; - if ( !file1.exists() ) -+ if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first ++ if ( org.bukkit.Bukkit.getOnlineMode() && !file1.exists() ) // Paper - Check online mode first { file1 = new File( file, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + name ).getBytes( java.nio.charset.StandardCharsets.UTF_8 ) ).toString() + s ); if ( file1.exists() )