From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Wed, 2 Mar 2016 00:03:55 -0600 Subject: [PATCH] Check online mode before converting and renaming player data diff --git a/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java b/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java index c3a1b5943b0dad8701d566c45b9b474dac7e5c8a..191c9e9a00b9871038f60d54bc22620322f6bdbd 100644 --- a/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java +++ b/src/main/java/net/minecraft/world/level/storage/WorldNBTStorage.java @@ -56,7 +56,7 @@ public class WorldNBTStorage { File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".dat"); // Spigot Start boolean usingWrongFile = false; - if ( !file.exists() ) + if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first { file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); if ( file.exists() )