diff options
author | Riley Park <[email protected]> | 2024-05-15 17:06:59 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-05-15 17:06:59 -0700 |
commit | f17519338bc589c045e0b32bfc37e048b23544d5 (patch) | |
tree | e50182ec698b4a9de8f366f485ee089b1901bbd9 /patches/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch | |
parent | 3fc93581bb876e8149b2ca423375a98f5ca12d27 (diff) | |
download | Paper-f17519338bc589c045e0b32bfc37e048b23544d5.tar.gz Paper-f17519338bc589c045e0b32bfc37e048b23544d5.zip |
Expose server build information (#10729)
* Expose server build information
* squash patches
* final tweaks
---------
Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: masmc05 <[email protected]>
Diffstat (limited to 'patches/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch')
-rw-r--r-- | patches/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/patches/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/patches/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch new file mode 100644 index 0000000000..bb493d5a5f --- /dev/null +++ b/patches/server/0096-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Sat, 7 May 2016 23:33:08 -0400 +Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat + + +diff --git a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java +index 4a01558a1c3d9cfcd043ad3998514311fe8f63d9..b679bbdfa307d3aa9f2f5e4c70c559695b2733de 100644 +--- a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java ++++ b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java +@@ -148,6 +148,7 @@ public class ScoreboardSaveData extends SavedData { + ListTag listTag = new ListTag(); + + for (PlayerTeam playerTeam : this.scoreboard.getPlayerTeams()) { ++ if (!io.papermc.paper.configuration.GlobalConfiguration.get().scoreboards.saveEmptyScoreboardTeams && playerTeam.getPlayers().isEmpty()) continue; // Paper - Don't save empty scoreboard teams to scoreboard.dat + CompoundTag compoundTag = new CompoundTag(); + compoundTag.putString("Name", playerTeam.getName()); + compoundTag.putString("DisplayName", Component.Serializer.toJson(playerTeam.getDisplayName(), registries)); |