Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
60b59901af
Restab at the last upstream to add support for migrating the option for disabling player data saving back into spigots config, vs blindly dropping it Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Spigot Changes: a19903d2 SPIGOT-520: Add option to disable player data saving
20 Zeilen
1.1 KiB
Diff
20 Zeilen
1.1 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/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
index 88e0c5167ce545ef98868947b2722c55bbc46687..6a9e0e644801ddc5f18a47d15d5f6d5b6dc13004 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
@@ -49,7 +49,7 @@ public class WorldNBTStorage {
|
|
File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".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.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
|
|
if ( file.exists() )
|