From b8d05bbc2705f98585457976ff2da2934a21e6a4 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 7 May 2016 23:33:08 -0400 Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat --- .../world/scores/ScoreboardSaveData.java.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 paper-server/patches/sources/net/minecraft/world/scores/ScoreboardSaveData.java.patch diff --git a/paper-server/patches/sources/net/minecraft/world/scores/ScoreboardSaveData.java.patch b/paper-server/patches/sources/net/minecraft/world/scores/ScoreboardSaveData.java.patch new file mode 100644 index 0000000000..d29c6da396 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/world/scores/ScoreboardSaveData.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/scores/ScoreboardSaveData.java ++++ b/net/minecraft/world/scores/ScoreboardSaveData.java +@@ -148,6 +148,7 @@ + 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));