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
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
2020-08-25 02:22:08 +00:00
|
|
|
index 9190e7c6de201868b909f0724930f13f7ec82edf..9d81bb896e3688c644edf93cd9dfeadd9cdf8836 100644
|
2015-03-05 21:30:48 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
2020-08-25 02:22:08 +00:00
|
|
|
@@ -48,7 +48,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() )
|