mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-17 18:47:40 +01:00
Don't save empty scoreboard teams to scoreboard.dat
This commit is contained in:
parent
6d39090450
commit
b8d05bbc27
1 changed files with 10 additions and 0 deletions
|
@ -0,0 +1,10 @@
|
|||
--- a/net/minecraft/world/scores/ScoreboardSaveData.java
|
||||
+++ b/net/minecraft/world/scores/ScoreboardSaveData.java
|
||||
@@ -148,6 +148,7 @@
|
||||
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(), registries));
|
Loading…
Add table
Reference in a new issue