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