mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 19:52:55 +01:00
18 lines
1.2 KiB
Diff
18 lines
1.2 KiB
Diff
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
|
|
index 28e631be85fb06245e152e1f5e0bae16b7358cfd..b49d60d20d170d16a7daf2bc874e5d8d04552b3e 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
|
|
CompoundTag compoundTag = new CompoundTag();
|
|
compoundTag.putString("Name", playerTeam.getName());
|
|
compoundTag.putString("DisplayName", Component.Serializer.toJson(playerTeam.getDisplayName()));
|