mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 10:35:38 +01:00
Updated Upstream (Spigot)
Restab at the last upstream to add support for migrating the option for disabling player data saving back into spigots config, vs blindly dropping it 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 Spigot Changes: a19903d2 SPIGOT-520: Add option to disable player data saving
This commit is contained in:
parent
611a0ee52d
commit
60b59901af
@ -4792,3 +4792,20 @@ index 1aec70a1f1a9d8fd2cd06bde4033e19e769ab331..f72c13bedaa6fa45e26f5dcad564835b
|
|||||||
private int size;
|
private int size;
|
||||||
private int initialCapacity;
|
private int initialCapacity;
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
|
index a83e1cdbcbb6b01bee6a3f31dcac0b601a1ffc47..f08110a22646716bcdf6a8d25ec44df8d78e85a4 100644
|
||||||
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
|
@@ -118,7 +118,11 @@ public class SpigotConfig
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+ // Paper start
|
||||||
|
+ SpigotConfig.save();
|
||||||
|
+ }
|
||||||
|
+ public static void save() {
|
||||||
|
+ // Paper end
|
||||||
|
try
|
||||||
|
{
|
||||||
|
config.save( CONFIG_FILE );
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Check online mode before converting and renaming player data
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||||
index 9190e7c6de201868b909f0724930f13f7ec82edf..9d81bb896e3688c644edf93cd9dfeadd9cdf8836 100644
|
index 88e0c5167ce545ef98868947b2722c55bbc46687..6a9e0e644801ddc5f18a47d15d5f6d5b6dc13004 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
||||||
@@ -48,7 +48,7 @@ public class WorldNBTStorage {
|
@@ -49,7 +49,7 @@ public class WorldNBTStorage {
|
||||||
File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".dat");
|
File file = new File(this.playerDir, entityhuman.getUniqueIDString() + ".dat");
|
||||||
// Spigot Start
|
// Spigot Start
|
||||||
boolean usingWrongFile = false;
|
boolean usingWrongFile = false;
|
||||||
|
@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
|
|||||||
the plugin logger.
|
the plugin logger.
|
||||||
|
|
||||||
diff --git a/pom.xml b/pom.xml
|
diff --git a/pom.xml b/pom.xml
|
||||||
index 2781d908fc9fcaa902fff1f86e7dffd86bd4c772..ee5747efddbbff3ed11caa6cca326e6c55b60fc8 100644
|
index 7c775cb6b51be98e2a257a5e2774e23f35e46369..50379bfe731eb9538f365275c04a764b02944633 100644
|
||||||
--- a/pom.xml
|
--- a/pom.xml
|
||||||
+++ b/pom.xml
|
+++ b/pom.xml
|
||||||
@@ -64,7 +64,7 @@
|
@@ -64,7 +64,7 @@
|
||||||
@ -28,10 +28,10 @@ index 2781d908fc9fcaa902fff1f86e7dffd86bd4c772..ee5747efddbbff3ed11caa6cca326e6c
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index fdca34346a31a6096b8005670464a4c42ae2f73b..6d77bbc5aa98ec7c3977b1d36b13c96cc6582e01 100644
|
index 23c1ba33903f8913a33332d06b2fd1aa3c90f1a1..bf00d6d263b692e8a597694c689768f177835fde 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
@@ -286,7 +286,7 @@ public class SpigotConfig
|
@@ -290,7 +290,7 @@ public class SpigotConfig
|
||||||
private static void playerSample()
|
private static void playerSample()
|
||||||
{
|
{
|
||||||
playerSample = getInt( "settings.sample-count", 12 );
|
playerSample = getInt( "settings.sample-count", 12 );
|
||||||
|
@ -248,10 +248,10 @@ index aa125a52dcdf4f137cfe17c5dc808b17d5e9de0b..ea52e89bd965afbd74f15b0e29746573
|
|||||||
this.c = agameprofile;
|
this.c = agameprofile;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index 6d77bbc5aa98ec7c3977b1d36b13c96cc6582e01..1cf214eaca80feae283f6524605976022f856116 100644
|
index bf00d6d263b692e8a597694c689768f177835fde..b830bfefd2984f012de0e3877592e5198a2a02ea 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
@@ -285,7 +285,7 @@ public class SpigotConfig
|
@@ -289,7 +289,7 @@ public class SpigotConfig
|
||||||
public static int playerSample;
|
public static int playerSample;
|
||||||
private static void playerSample()
|
private static void playerSample()
|
||||||
{
|
{
|
||||||
|
@ -3,9 +3,12 @@ From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
|||||||
Date: Mon, 26 Mar 2018 18:30:53 +0300
|
Date: Mon, 26 Mar 2018 18:30:53 +0300
|
||||||
Subject: [PATCH] Make player data saving configurable
|
Subject: [PATCH] Make player data saving configurable
|
||||||
|
|
||||||
|
Upstream has added a patch which negates the need for this patch,
|
||||||
|
however, we should still migrate our configuration back upstream,
|
||||||
|
to prevent unexpected situations
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index cee8740e644c492e3d71fd58791e7d52d57e856d..f22bed69f690f6e4754b87dd61cebe9c6627b12d 100644
|
index 5fe6c36bdf8527d7fcb41e8d471194c7e395b946..29862494604ac1a0aaedd4ba84bc9d044fad9629 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -271,4 +271,13 @@ public class PaperConfig {
|
@@ -271,4 +271,13 @@ public class PaperConfig {
|
||||||
@ -13,24 +16,12 @@ index cee8740e644c492e3d71fd58791e7d52d57e856d..f22bed69f690f6e4754b87dd61cebe9c
|
|||||||
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
|
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ public static boolean savePlayerData = true;
|
|
||||||
+ private static void savePlayerData() {
|
+ private static void savePlayerData() {
|
||||||
+ savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
|
+ Object val = config.get("settings.save-player-data");
|
||||||
+ if(!savePlayerData) {
|
+ if (val instanceof Boolean) {
|
||||||
+ Bukkit.getLogger().log(Level.WARNING, "Player Data Saving is currently disabled. Any changes to your players data, " +
|
+ SpigotConfig.disablePlayerDataSaving = !(Boolean) val;
|
||||||
+ "such as inventories, experience points, advancements and the like will not be saved when they log out.");
|
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disableAdvancementSaving);
|
||||||
|
+ SpigotConfig.save();
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
||||||
index 9d81bb896e3688c644edf93cd9dfeadd9cdf8836..af9e94a87a946a4a9e2579a87f3f5a7adeb66f25 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java
|
|
||||||
@@ -25,6 +25,7 @@ public class WorldNBTStorage {
|
|
||||||
}
|
|
||||||
|
|
||||||
public void save(EntityHuman entityhuman) {
|
|
||||||
+ if(!com.destroystokyo.paper.PaperConfig.savePlayerData) return; // Paper - Make player data saving configurable
|
|
||||||
try {
|
|
||||||
NBTTagCompound nbttagcompound = entityhuman.save(new NBTTagCompound());
|
|
||||||
File file = File.createTempFile(entityhuman.getUniqueIDString() + "-", ".dat", this.playerDir);
|
|
||||||
|
@ -36,11 +36,11 @@ This change will result in some major changes to fishing formulas.
|
|||||||
I would love to see this change in Vanilla, so Mojang please pull :)
|
I would love to see this change in Vanilla, so Mojang please pull :)
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index f22bed69f690f6e4754b87dd61cebe9c6627b12d..c8a7d8092a2849b62a8d83d7970756fd76100025 100644
|
index 29862494604ac1a0aaedd4ba84bc9d044fad9629..b3309e97d14e82a6bd8d05a326e7bb4bdb88500a 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -280,4 +280,12 @@ public class PaperConfig {
|
@@ -280,4 +280,12 @@ public class PaperConfig {
|
||||||
"such as inventories, experience points, advancements and the like will not be saved when they log out.");
|
SpigotConfig.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash.
|
|||||||
This will help diagnose what was going on in that time before the crash.
|
This will help diagnose what was going on in that time before the crash.
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index e8d6cc7c116faaf168efdb0af0b2365bb7fb6eac..aaaaead8c740a22906612ca43147bd00eb4639f7 100644
|
index 7e942ad5c6c582ad110fd4e76d5900556c318884..7eb15023ca5ffb065d641431af790f62b7efee11 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
@@ -25,6 +25,7 @@ import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
@ -68,10 +68,10 @@ index f1bb3acf370ed71bc48116ce96396f999a34e83e..dce11770da204b09cdc2f89dceccb3cf
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
index 1cf214eaca80feae283f6524605976022f856116..e66050b87ace6544636e10123ad0963176e5fdf7 100644
|
index b830bfefd2984f012de0e3877592e5198a2a02ea..25a0873553a0ec6b2913e0cfb928f98e6f3f0bb7 100644
|
||||||
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
--- a/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||||
@@ -225,7 +225,7 @@ public class SpigotConfig
|
@@ -229,7 +229,7 @@ public class SpigotConfig
|
||||||
restartScript = getString( "settings.restart-script", restartScript );
|
restartScript = getString( "settings.restart-script", restartScript );
|
||||||
restartMessage = transform( getString( "messages.restart", "Server is restarting" ) );
|
restartMessage = transform( getString( "messages.restart", "Server is restarting" ) );
|
||||||
commands.put( "restart", new RestartCommand( "restart" ) );
|
commands.put( "restart", new RestartCommand( "restart" ) );
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Configurable connection throttle kick message
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index aaaaead8c740a22906612ca43147bd00eb4639f7..9e10e2e965dd52755ee5ede71104cc89b11da45e 100644
|
index 7eb15023ca5ffb065d641431af790f62b7efee11..020b67be1952e7bed2363fe8e4e287ad82b77752 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -273,6 +273,11 @@ public class PaperConfig {
|
@@ -273,6 +273,11 @@ public class PaperConfig {
|
||||||
@ -17,9 +17,9 @@ index aaaaead8c740a22906612ca43147bd00eb4639f7..9e10e2e965dd52755ee5ede71104cc89
|
|||||||
+ connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage);
|
+ connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public static boolean savePlayerData = true;
|
|
||||||
private static void savePlayerData() {
|
private static void savePlayerData() {
|
||||||
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
|
Object val = config.get("settings.save-player-data");
|
||||||
|
if (val instanceof Boolean) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||||
index abace78271eedd453df692f4e24dacef474d215e..5e1747dc176ef855829a38605ec85c8494fb0d21 100644
|
index abace78271eedd453df692f4e24dacef474d215e..5e1747dc176ef855829a38605ec85c8494fb0d21 100644
|
||||||
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Make the default permission message configurable
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index 01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed..f9b1b198299166759fe0bd0a36d8d88c626e06a4 100644
|
index d38c5e34b8f2e4274a3255f6522d666dedf8e068..acdaceb0d1b4576f4dc2ac4c961df354d5dd921f 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -19,6 +19,7 @@ import java.util.regex.Pattern;
|
@@ -19,6 +19,7 @@ import java.util.regex.Pattern;
|
||||||
@ -25,9 +25,9 @@ index 01d48da8b2f89ad3a615ad10c044c5f0a08ee4ed..f9b1b198299166759fe0bd0a36d8d88c
|
|||||||
+ noPermissionMessage = ChatColor.translateAlternateColorCodes('&', getString("messages.no-permission", noPermissionMessage));
|
+ noPermissionMessage = ChatColor.translateAlternateColorCodes('&', getString("messages.no-permission", noPermissionMessage));
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
public static boolean savePlayerData = true;
|
|
||||||
private static void savePlayerData() {
|
private static void savePlayerData() {
|
||||||
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
|
Object val = config.get("settings.save-player-data");
|
||||||
|
if (val instanceof Boolean) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 251433b5a0560cdfca298aca45c53191b74bc403..975b2b35324d5eb00a85b4771f68dd0b320c58e3 100644
|
index 251433b5a0560cdfca298aca45c53191b74bc403..975b2b35324d5eb00a85b4771f68dd0b320c58e3 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 37d799b230195de166af55b0a746310ddcf92bc0
|
Subproject commit a19903d24b3189e8769657b9b130f7ed5919b8b8
|
Loading…
Reference in New Issue
Block a user