mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
e4d10a6d67
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType() CraftBukkit Changes:bbe3d58e
SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException3075579f
Add FaceAttachable interface to handle Grindstone facing in common with Switches95bd4238
SPIGOT-5647: ZombieVillager entity should have getVillagerType()4d975ac3
SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
36 lines
1.7 KiB
Diff
36 lines
1.7 KiB
Diff
From 1b034a1522ff6477cdba7cf9adc8a6feeeda8a6e 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/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
index e4f0db64c0..67f35fe66b 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -228,4 +228,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 1eab0c310d..6bf66972f9 100644
|
|
--- a/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
|
+++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
|
@@ -174,6 +174,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.25.1
|
|
|