2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2015-03-05 21:30:48 +00:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
2016-02-29 23:09:49 +00:00
|
|
|
Date: Wed, 2 Mar 2016 00:03:55 -0600
|
2015-03-05 21:30:48 +00:00
|
|
|
Subject: [PATCH] Check online mode before converting and renaming player data
|
|
|
|
|
|
|
|
|
2021-03-16 07:19:45 +00:00
|
|
|
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 {
|
2019-04-24 02:34:11 +00:00
|
|
|
File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".dat");
|
2015-03-05 21:30:48 +00:00
|
|
|
// Spigot Start
|
|
|
|
boolean usingWrongFile = false;
|
|
|
|
- if ( !file.exists() )
|
2016-02-29 23:09:49 +00:00
|
|
|
+ if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first
|
2015-03-05 21:30:48 +00:00
|
|
|
{
|
2020-06-25 09:27:25 +00:00
|
|
|
file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
|
2015-03-05 21:30:48 +00:00
|
|
|
if ( file.exists() )
|