Check online mode before converting and renaming player data

This commit is contained in:
Zach Brown 2016-03-02 00:03:55 -06:00
parent b8b1eef98c
commit 188e3332d6

View file

@ -58,7 +58,7 @@
+ File file1 = new File(file, s1 + s);
+ // Spigot Start
+ boolean usingWrongFile = false;
+ if ( !file1.exists() )
+ 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() )