2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
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
2022-06-09 08:51:45 +00:00
index b837b6616a2384b253cca8ed62c9488b639f6298..2be7a697f08045b974579e6942b38571e744efac 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
+++ b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
2021-11-23 13:22:49 +00:00
@@ -136,6 +136,7 @@ public class ScoreboardSaveData extends SavedData {
2021-06-12 05:20:08 +00:00
ListTag listTag = new ListTag();
2021-06-11 12:02:28 +00:00
2021-06-12 05:20:08 +00:00
for(PlayerTeam playerTeam : this.scoreboard.getPlayerTeams()) {
2022-06-09 08:51:45 +00:00
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().scoreboards.saveEmptyScoreboardTeams && playerTeam.getPlayers().isEmpty()) continue; // Paper
2021-06-12 05:20:08 +00:00
CompoundTag compoundTag = new CompoundTag();
compoundTag.putString("Name", playerTeam.getName());
compoundTag.putString("DisplayName", Component.Serializer.toJson(playerTeam.getDisplayName()));