mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 20:46:59 +01:00
19 lines
1.2 KiB
Diff
19 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 a6d23b23e5b5c02427ec538d1d7fd89f51e9e59c..4def212655cea0fd998b52e924f8b671d6aeb559 100644
|
|
--- a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
|
|
+++ b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
|
|
@@ -143,6 +143,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()));
|