--- a/net/minecraft/world/scores/ScoreboardSaveData.java
+++ b/net/minecraft/world/scores/ScoreboardSaveData.java
@@ -39,7 +_,7 @@
             this.scoreboard.getObjectives().stream().map(Objective::pack).toList(),
             this.scoreboard.packPlayerScores(),
             map,
-            this.scoreboard.getPlayerTeams().stream().map(PlayerTeam::pack).toList()
+            this.scoreboard.getPlayerTeams().stream().filter(p -> io.papermc.paper.configuration.GlobalConfiguration.get().scoreboards.saveEmptyScoreboardTeams || !p.getPlayers().isEmpty()).map(PlayerTeam::pack).toList() // Paper - Don't save empty scoreboard teams to scoreboard.dat
         );
     }
 
