aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0043-Check-online-mode-before-converting-and-renaming-pla.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0043-Check-online-mode-before-converting-and-renaming-pla.patch')
-rw-r--r--patches/server/0043-Check-online-mode-before-converting-and-renaming-pla.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0043-Check-online-mode-before-converting-and-renaming-pla.patch b/patches/server/0043-Check-online-mode-before-converting-and-renaming-pla.patch
new file mode 100644
index 0000000000..f89cf885a5
--- /dev/null
+++ b/patches/server/0043-Check-online-mode-before-converting-and-renaming-pla.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Zach Brown <[email protected]>
+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 79222a04ef104bf2eed85684479384b7c350ea19..e11c8523e633d2a8e3cea7ecd54978b2958b9684 100644
+--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
++++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
+@@ -78,7 +78,7 @@ public class PlayerDataStorage {
+ File file1 = new File(file, s1 + s);
+ // Spigot Start
+ boolean usingWrongFile = false;
+- if ( !file1.exists() )
++ if ( org.bukkit.Bukkit.getOnlineMode() && !file.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() )