diff --git a/Spigot-Server-Patches/0156-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch b/Spigot-Server-Patches/0156-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch new file mode 100644 index 0000000000..71ada08a15 --- /dev/null +++ b/Spigot-Server-Patches/0156-Don-t-save-empty-scoreboard-teams-to-scoreboard.dat.patch @@ -0,0 +1,35 @@ +From 6b473248bd86bc52923944193dab9587e0a49959 Mon Sep 17 00:00:00 2001 +From: Aikar +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/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java +index 1199fa2..f5f1e2a 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +@@ -223,4 +223,9 @@ public class PaperConfig { + private static void enablePlayerCollisions() { + enablePlayerCollisions = getBoolean("settings.enable-player-collisions", true); + } ++ ++ public static boolean saveEmptyScoreboardTeams = false; ++ private static void saveEmptyScoreboardTeams() { ++ saveEmptyScoreboardTeams = getBoolean("settings.save-empty-scoreboard-teams", false); ++ } + } +diff --git a/src/main/java/net/minecraft/server/PersistentScoreboard.java b/src/main/java/net/minecraft/server/PersistentScoreboard.java +index 3ef20d3..db72494 100644 +--- a/src/main/java/net/minecraft/server/PersistentScoreboard.java ++++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java +@@ -182,6 +182,7 @@ public class PersistentScoreboard extends PersistentBase { + + while (iterator.hasNext()) { + ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next(); ++ if (!com.destroystokyo.paper.PaperConfig.saveEmptyScoreboardTeams && scoreboardteam.getPlayerNameSet().isEmpty()) continue; // Paper + NBTTagCompound nbttagcompound = new NBTTagCompound(); + + nbttagcompound.setString("Name", scoreboardteam.getName()); +-- +2.8.2 + diff --git a/scripts/importmcdev.sh b/scripts/importmcdev.sh index 091fff948e..b3d688f5d0 100755 --- a/scripts/importmcdev.sh +++ b/scripts/importmcdev.sh @@ -59,6 +59,7 @@ import FileIOThread import ItemBlock import NBTTagCompound import NBTTagList +import PersistentScoreboard import PacketPlayInResourcePackStatus import PacketPlayInUseEntity import PacketPlayOutPlayerListHeaderFooter