9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-22 00:19:20 +00:00
Files
Leaf/patches/server/0059-Remove-useless-creating-stats-json-bases-on-player-n.patch
Dreeam 4a06d00973 Refactor: Leaf Config v3 (#81)
* 1

* 2

* 3

* 4

* 5

* 6

* 7

* Change contact info in config

* Add contact info for QQ group

* Add more detailed explanation for configurable connection message config

* Fix comments grammar issues

* Purge old or outdated config on load config

* Clean up
2024-07-12 01:34:15 +08:00

29 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Tue, 27 Feb 2024 03:17:10 -0500
Subject: [PATCH] Remove useless creating stats json bases on player name logic
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 53a2891015a5122cb3194ef06ce3a5e3dfd798c5..47e640a8be96f5e415a1ec8655b4eb7c64604a99 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1519,6 +1519,8 @@ public abstract class PlayerList {
File file = this.server.getWorldPath(LevelResource.PLAYER_STATS_DIR).toFile();
File file1 = new File(file, String.valueOf(uuid) + ".json");
+ // Leaf start - Remove useless creating stats json bases on player name logic
+ /*
if (!file1.exists()) {
File file2 = new File(file, displayName + ".json"); // CraftBukkit
Path path = file2.toPath();
@@ -1527,6 +1529,8 @@ public abstract class PlayerList {
file2.renameTo(file1);
}
}
+ */
+ // Leaf end - Remove useless creating stats json bases on player name logic
serverstatisticmanager = new ServerStatsCounter(this.server, file1);
// this.stats.put(uuid, serverstatisticmanager); // CraftBukkit