2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
|
|
|
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/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
|
|
|
@@ -0,0 +0,0 @@ public class PlayerDataStorage {
|
2024-04-24 01:30:03 +02:00
|
|
|
File file1 = new File(file, s1 + s);
|
|
|
|
// Spigot Start
|
|
|
|
boolean usingWrongFile = false;
|
|
|
|
- if ( !file1.exists() )
|
2024-08-19 00:32:25 +02:00
|
|
|
+ if ( org.bukkit.Bukkit.getOnlineMode() && !file1.exists() ) // Paper - Check online mode first
|
2024-04-24 01:30:03 +02:00
|
|
|
{
|
|
|
|
file1 = new File( file, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + name ).getBytes( java.nio.charset.StandardCharsets.UTF_8 ) ).toString() + s );
|
|
|
|
if ( file1.exists() )
|