20 Zeilen
1.2 KiB
Diff
20 Zeilen
1.2 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Zach Brown <zach.brown@destroystokyo.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 067c5acd4aad346ac9ccf6d1b5aa6691b0ccd348..60fe01e824e4657d2601797d7858d5de339ab255 100644
|
||
|
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||
|
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||
|
@@ -56,7 +56,7 @@ public class PlayerDataStorage {
|
||
|
File file = new File(this.playerDir, entityhuman.getStringUUID() + ".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.getScoreboardName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
|
||
|
if ( file.exists() )
|