From 27979ca2fa2fd1866443b3960047b7dc5c8e9e7e Mon Sep 17 00:00:00 2001 From: Mariell Date: Sun, 8 Nov 2020 11:00:43 +0100 Subject: [PATCH] Updated Upstream (Spigot) (#4745) 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 --- ...support.patch => 0548-Brand-support.patch} | 0 ...support.patch => 0558-Brand-support.patch} | 0 ...le-Alternative-LootPool-Luck-Formula.patch | 4 +-- ...ble-connection-throttle-kick-message.patch | 6 ++-- ...Make-player-data-saving-configurable.patch | 36 ------------------- ...ault-permission-message-configurable.patch | 6 ++-- work/Spigot | 2 +- 7 files changed, 9 insertions(+), 45 deletions(-) rename Spigot-Server-Patches/{0549-Brand-support.patch => 0548-Brand-support.patch} (100%) rename Spigot-Server-Patches/{0559-Brand-support.patch => 0558-Brand-support.patch} (100%) delete mode 100644 Spigot-Server-Patches/Make-player-data-saving-configurable.patch diff --git a/Spigot-Server-Patches/0549-Brand-support.patch b/Spigot-Server-Patches/0548-Brand-support.patch similarity index 100% rename from Spigot-Server-Patches/0549-Brand-support.patch rename to Spigot-Server-Patches/0548-Brand-support.patch diff --git a/Spigot-Server-Patches/0559-Brand-support.patch b/Spigot-Server-Patches/0558-Brand-support.patch similarity index 100% rename from Spigot-Server-Patches/0559-Brand-support.patch rename to Spigot-Server-Patches/0558-Brand-support.patch diff --git a/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch b/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch index b30d7488df..b72788c6f7 100644 --- a/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch +++ b/Spigot-Server-Patches/Configurable-Alternative-LootPool-Luck-Formula.patch @@ -40,8 +40,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -0,0 +0,0 @@ public class PaperConfig { - "such as inventories, experience points, advancements and the like will not be saved when they log out."); - } + private static void authenticationServersDownKickMessage() { + authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage)); } + + public static boolean useAlternativeLuckFormula = false; diff --git a/Spigot-Server-Patches/Configurable-connection-throttle-kick-message.patch b/Spigot-Server-Patches/Configurable-connection-throttle-kick-message.patch index 0b5c3c023f..a52498f0d9 100644 --- a/Spigot-Server-Patches/Configurable-connection-throttle-kick-message.patch +++ b/Spigot-Server-Patches/Configurable-connection-throttle-kick-message.patch @@ -17,9 +17,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage); + } + - public static boolean savePlayerData = true; - private static void savePlayerData() { - savePlayerData = getBoolean("settings.save-player-data", savePlayerData); + public static boolean useAlternativeLuckFormula = false; + private static void useAlternativeLuckFormula() { + useAlternativeLuckFormula = getBoolean("settings.use-alternative-luck-formula", false); diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/HandshakeListener.java diff --git a/Spigot-Server-Patches/Make-player-data-saving-configurable.patch b/Spigot-Server-Patches/Make-player-data-saving-configurable.patch deleted file mode 100644 index 2db25b2cc5..0000000000 --- a/Spigot-Server-Patches/Make-player-data-saving-configurable.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Mark Vainomaa -Date: Mon, 26 Mar 2018 18:30:53 +0300 -Subject: [PATCH] Make player data saving configurable - - -diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/com/destroystokyo/paper/PaperConfig.java -+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -0,0 +0,0 @@ public class PaperConfig { - private static void authenticationServersDownKickMessage() { - authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage)); - } -+ -+ public static boolean savePlayerData = true; -+ private static void savePlayerData() { -+ savePlayerData = getBoolean("settings.save-player-data", savePlayerData); -+ if(!savePlayerData) { -+ Bukkit.getLogger().log(Level.WARNING, "Player Data Saving is currently disabled. Any changes to your players data, " + -+ "such as inventories, experience points, advancements and the like will not be saved when they log out."); -+ } -+ } - } -diff --git a/src/main/java/net/minecraft/server/WorldNBTStorage.java b/src/main/java/net/minecraft/server/WorldNBTStorage.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/WorldNBTStorage.java -+++ b/src/main/java/net/minecraft/server/WorldNBTStorage.java -@@ -0,0 +0,0 @@ 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); diff --git a/Spigot-Server-Patches/Make-the-default-permission-message-configurable.patch b/Spigot-Server-Patches/Make-the-default-permission-message-configurable.patch index 2b34660d3a..6d1bb051a8 100644 --- a/Spigot-Server-Patches/Make-the-default-permission-message-configurable.patch +++ b/Spigot-Server-Patches/Make-the-default-permission-message-configurable.patch @@ -25,9 +25,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + noPermissionMessage = ChatColor.translateAlternateColorCodes('&', getString("messages.no-permission", noPermissionMessage)); + } + - public static boolean savePlayerData = true; - private static void savePlayerData() { - savePlayerData = getBoolean("settings.save-player-data", savePlayerData); + public static boolean useAlternativeLuckFormula = false; + private static void useAlternativeLuckFormula() { + useAlternativeLuckFormula = getBoolean("settings.use-alternative-luck-formula", false); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/work/Spigot b/work/Spigot index 37d799b230..a19903d24b 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit 37d799b230195de166af55b0a746310ddcf92bc0 +Subproject commit a19903d24b3189e8769657b9b130f7ed5919b8b8