Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
19 Zeilen
1.2 KiB
Diff
19 Zeilen
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..6c3ed29e13ea78ceb1c9bb11ce0d9938bb8b4c62 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 - 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()));
|