2016-06-23 04:43:02 +02:00
|
|
|
From 7ac9506d355be738247bdc6cfc04894ce8ab7f8b Mon Sep 17 00:00:00 2001
|
2016-05-08 05:39:22 +02:00
|
|
|
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/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
2016-06-09 05:57:14 +02:00
|
|
|
index 24fb01c..058720f 100644
|
2016-05-08 05:39:22 +02:00
|
|
|
--- 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
|
2016-05-12 04:07:46 +02:00
|
|
|
index 230004b..62752f8 100644
|
2016-05-08 05:39:22 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
2016-05-12 04:07:46 +02:00
|
|
|
@@ -184,6 +184,7 @@ public class PersistentScoreboard extends PersistentBase {
|
2016-05-08 05:39:22 +02:00
|
|
|
|
|
|
|
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());
|
|
|
|
--
|
2016-06-23 04:18:41 +02:00
|
|
|
2.9.0
|
2016-05-08 05:39:22 +02:00
|
|
|
|