3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00

Fix migration logic for old player saving config option

This is an ode to all those times when you shoulda just gone to bed
Dieser Commit ist enthalten in:
Shane Freeder 2021-12-28 08:10:38 +00:00
Ursprung 8f65f378ce
Commit 87e443bf9a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C
19 geänderte Dateien mit 41 neuen und 40 gelöschten Zeilen

Datei anzeigen

@ -7,10 +7,10 @@ This patch contains config migrations for when upstream adds options
which Paper already had.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index f4735cc330822183e098a67f2c0f00f21db9e137..c5c82496524705a0ce85df5508ec730c19246ec7 100644
index f4735cc330822183e098a67f2c0f00f21db9e137..806b612d3c9ca1dd76be88170b3268ca45acef63 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -291,4 +291,22 @@ public class PaperConfig {
@@ -291,4 +291,23 @@ public class PaperConfig {
private static void authenticationServersDownKickMessage() {
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
}
@ -19,8 +19,9 @@ index f4735cc330822183e098a67f2c0f00f21db9e137..c5c82496524705a0ce85df5508ec730c
+ Object val = config.get("settings.save-player-data");
+ if (val instanceof Boolean) {
+ SpigotConfig.disablePlayerDataSaving = !(Boolean) val;
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disableAdvancementSaving);
+ SpigotConfig.config.set("players.disable-saving", SpigotConfig.disablePlayerDataSaving);
+ SpigotConfig.save();
+ config.set("settings.save-player-data", null);
+ }
+ }
+

Datei anzeigen

@ -36,10 +36,10 @@ This change will result in some major changes to fishing formulas.
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
index c5c82496524705a0ce85df5508ec730c19246ec7..8ecd1e851cc2168c538947623e1c328e463b52d9 100644
index 806b612d3c9ca1dd76be88170b3268ca45acef63..915e2c5b0ffbd0d459a203e1bfb131be4c5476d4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -309,4 +309,12 @@ public class PaperConfig {
@@ -310,4 +310,12 @@ public class PaperConfig {
SpigotConfig.save();
}
}

Datei anzeigen

@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 8ecd1e851cc2168c538947623e1c328e463b52d9..1508afe593a1b62e3a33455707e2552468786614 100644
index 915e2c5b0ffbd0d459a203e1bfb131be4c5476d4..00dd9dab2b19f3e49f3b41c20eb96a84bfae1769 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -317,4 +317,18 @@ public class PaperConfig {
@@ -318,4 +318,18 @@ public class PaperConfig {
Bukkit.getLogger().log(Level.INFO, "Using Aikar's Alternative Luck Formula to apply Luck attribute to all loot pool calculations. See https://luckformula.emc.gs");
}
}

Datei anzeigen

@ -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.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 1508afe593a1b62e3a33455707e2552468786614..73b49d24cd428e2328d56f5f42333a25a1d6ebae 100644
index 00dd9dab2b19f3e49f3b41c20eb96a84bfae1769..d9114c5fa141c37270398100db6bb2a8a8e4ed1e 100644
--- a/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;
@ -20,7 +20,7 @@ index 1508afe593a1b62e3a33455707e2552468786614..73b49d24cd428e2328d56f5f42333a25
public class PaperConfig {
@@ -318,6 +319,14 @@ public class PaperConfig {
@@ -319,6 +320,14 @@ public class PaperConfig {
}
}

Datei anzeigen

@ -161,7 +161,7 @@ index 0fda52841b5e1643efeda92106124998abc4e0aa..fe79c0add4f7cb18d487c5bb9415c40c
public static Timing getTickList(ServerLevel worldserver, String timingsType) {
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 73b49d24cd428e2328d56f5f42333a25a1d6ebae..a89ccdf2ea517d2ec38c9433bdc26802884ed988 100644
index d9114c5fa141c37270398100db6bb2a8a8e4ed1e..7cec7a377d64dd00ea6fb8f82af489d4bf3bf572 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -1,5 +1,6 @@
@ -171,7 +171,7 @@ index 73b49d24cd428e2328d56f5f42333a25a1d6ebae..a89ccdf2ea517d2ec38c9433bdc26802
import com.google.common.base.Strings;
import com.google.common.base.Throwables;
@@ -340,4 +341,58 @@ public class PaperConfig {
@@ -341,4 +342,58 @@ public class PaperConfig {
}
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
}

Datei anzeigen

@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index da21f1623a90ade429723d4eb12d646aaf28071e..1015fcc6c77bd64c3f3cbf234e85a6602dbfa0d7 100644
index 9aa28bb2968522ef1b9375bcc872e6d8dfb01764..edf0a82ba7e16b86100aa1920fa41508be2ab1e8 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -9,6 +9,7 @@ import java.io.IOException;
@ -34,7 +34,7 @@ index da21f1623a90ade429723d4eb12d646aaf28071e..1015fcc6c77bd64c3f3cbf234e85a660
}
public static int packetInSpamThreshold = 300;
@@ -347,6 +348,20 @@ public class PaperConfig {
@@ -348,6 +349,20 @@ public class PaperConfig {
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 769353df1fcdaacecd80085165a1d72f99b577ee..4875e323e8ba52cf91259262b8418310061718ad 100644
index c48b175d5511b733bcff9a93a874f5ffc0174691..e683e5bf47abe7bd3d2f7e9811a377549308ded4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -368,6 +368,13 @@ public class PaperConfig {
@@ -369,6 +369,13 @@ public class PaperConfig {
}
}

Datei anzeigen

@ -92,10 +92,10 @@ index 898e2efb764e5bd97ab4e757e6c4c27fc4efdbef..055abcdfd779ce37d657845b3c6322f0
exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index a074df5708624bd4b0bc2ad3dcbd4bc4ff737595..68dc68238adc8d288052132e9f70663e8bba1e80 100644
index c20fe23174d8a12bfc5acb4b0e947c6fca5ab897..6ee4d5377d3963c67c6da4e5b164e49949768f03 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -429,4 +429,9 @@ public class PaperConfig {
@@ -430,4 +430,9 @@ public class PaperConfig {
log("Async Chunks: Enabled - Chunks will be loaded much faster, without lag.");
}
}

Datei anzeigen

@ -13,10 +13,10 @@ A config is provided if you rather let players use these exploits, and let
them destroy the worlds End Portals and get on top of the nether easy.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 68dc68238adc8d288052132e9f70663e8bba1e80..bfaaa80a5b144bd46ff3ea6a782aa87e5c51e8ea 100644
index 6ee4d5377d3963c67c6da4e5b164e49949768f03..e849c9c9fccf928399478dc3727eba55ae5b40d4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -434,4 +434,15 @@ public class PaperConfig {
@@ -435,4 +435,15 @@ public class PaperConfig {
private static void loggerSettings() {
deobfuscateStacktraces = getBoolean("settings.loggers.deobfuscate-stacktraces", deobfuscateStacktraces);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add option for console having all permissions
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index bfaaa80a5b144bd46ff3ea6a782aa87e5c51e8ea..374cb5a2fb8c44b7d914beff5688cf36fc08640c 100644
index e849c9c9fccf928399478dc3727eba55ae5b40d4..edfa4a27a18b5c9df75f3952c51acdde1faa6dde 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -445,4 +445,9 @@ public class PaperConfig {
@@ -446,4 +446,9 @@ public class PaperConfig {
config.set("settings.unsupported-settings.allow-permanent-block-break-exploits-readme", "This setting controls if players should be able to break bedrock, end portals and other intended to be permanent blocks.");
allowBlockPermanentBreakingExploits = getBoolean("settings.unsupported-settings.allow-permanent-block-break-exploits", allowBlockPermanentBreakingExploits);
}

Datei anzeigen

@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840
This patch also fixes rail duping and carpet duping.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 374cb5a2fb8c44b7d914beff5688cf36fc08640c..ebbbffd209c6796bc608992e293035141a122d1f 100644
index edfa4a27a18b5c9df75f3952c51acdde1faa6dde..a545a882335094daa787ec5c7005939080195263 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -450,4 +450,12 @@ public class PaperConfig {
@@ -451,4 +451,12 @@ public class PaperConfig {
private static void consoleHasAllPermissions() {
consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk and player saving
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index ebbbffd209c6796bc608992e293035141a122d1f..4fb6b2153117f54a2b0ca940de4c0ee2fa85e20e 100644
index a545a882335094daa787ec5c7005939080195263..933d3ace21f5a313f1d5e4dfd86777f6fa235f3f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -458,4 +458,14 @@ public class PaperConfig {
@@ -459,4 +459,14 @@ public class PaperConfig {
set("settings.unsupported-settings.allow-tnt-duplication", null);
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Prevent headless pistons from being created
Prevent headless pistons from being created by explosions or tree/mushroom growth.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 4fb6b2153117f54a2b0ca940de4c0ee2fa85e20e..09755771f8a3b2f696dc9c33916546fc1d5ac4ba 100644
index 933d3ace21f5a313f1d5e4dfd86777f6fa235f3f..1fd89294fabcd2a390ba7f1502acbfeb9a2343d6 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -468,4 +468,10 @@ public class PaperConfig {
@@ -469,4 +469,10 @@ public class PaperConfig {
maxPlayerAutoSavePerTick = (playerAutoSaveRate == -1 || playerAutoSaveRate > 100) ? 10 : 20;
}
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Limit recipe packets
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index bd7926fa89621e8cdd0b5fdd8ed3b8c6dbfbc3ec..f20497eb1202e3e4c256f6cf04f8644a2413fe27 100644
index ec42fb00b6f4a691fa710c68131f80b242e3e6e8..d5ae781d65016e0382cb3497cb8cac201680bc8c 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -365,6 +365,13 @@ public class PaperConfig {
@@ -366,6 +366,13 @@ public class PaperConfig {
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Make item validations configurable
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index ae7ca7fbed3a1a4532a78bb8a029bb7fc642bcb3..0460fe8700ee09543263045edaea7a09bd5be035 100644
index 6ebc539a5cf795fdde38a199fbce7fed39a07e0c..06a479af429a92e441eb9e58f36760d0ff75fe7e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -503,4 +503,19 @@ public class PaperConfig {
@@ -504,4 +504,19 @@ public class PaperConfig {
config.set("settings.unsupported-settings.allow-headless-pistons-readme", "This setting controls if players should be able to create headless pistons.");
allowHeadlessPistons = getBoolean("settings.unsupported-settings.allow-headless-pistons", false);
}

Datei anzeigen

@ -24,10 +24,10 @@ and an action can be defined: DROP or KICK
If interval or rate are less-than 0, the limit is ignored
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 0460fe8700ee09543263045edaea7a09bd5be035..aafb87e80ff2cbc7f46fc102dd5b1d828206ecc8 100644
index 06a479af429a92e441eb9e58f36760d0ff75fe7e..eeae1a043ef185f206e923a5799e173cf3cf485d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -518,4 +518,102 @@ public class PaperConfig {
@@ -519,4 +519,102 @@ public class PaperConfig {
itemValidationBookAuthorLength = getInt("settings.item-validation.book.author", itemValidationBookAuthorLength);
itemValidationBookPageLength = getInt("settings.item-validation.book.page", itemValidationBookPageLength);
}
@ -131,7 +131,7 @@ index 0460fe8700ee09543263045edaea7a09bd5be035..aafb87e80ff2cbc7f46fc102dd5b1d82
+ }
}
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index c2642f798c49f79d34e599517d64d73b6e7676c6..241b086bd096a4bc2175835b2505deda1c143f09 100644
index 3cb89b76887e46f82a660c3832474bd7dbee5f57..201ddfa8fe6231265dcc1a7c8141badbdadbea47 100644
--- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java
@@ -126,6 +126,22 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Lag compensate block breaking
Use time instead of ticks if ticks fall behind
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index aafb87e80ff2cbc7f46fc102dd5b1d828206ecc8..f34ae86812b13a96b509724591a75c1aacd5e918 100644
index eeae1a043ef185f206e923a5799e173cf3cf485d..b591b47fc663289682c35f480f851b7eceb979dd 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -616,4 +616,10 @@ public class PaperConfig {
@@ -617,4 +617,10 @@ public class PaperConfig {
}
}
}

Datei anzeigen

@ -9,10 +9,10 @@ Configurable under
`send-full-pos-for-hard-colliding-entities`
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index f34ae86812b13a96b509724591a75c1aacd5e918..eaa1d5491ef3f5caf156d16fa7544741e53c6bab 100644
index b591b47fc663289682c35f480f851b7eceb979dd..31e057e16c04f6cb6a4fa42e6ac9e81198e24d79 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -622,4 +622,10 @@ public class PaperConfig {
@@ -623,4 +623,10 @@ public class PaperConfig {
private static void lagCompensateBlockBreaking() {
lagCompensateBlockBreaking = getBoolean("settings.lag-compensate-block-breaking", true);
}

Datei anzeigen

@ -10,10 +10,10 @@ when if this was fixed on the client, that wouldn't be needed.
Mojira Issue: https://bugs.mojang.com/browse/MC-235045
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index cd918cec00d8202252af0d20b1a8891371c538e3..6d02910a903f2c6352202c49149172e3eee3ed86 100644
index 609f7ff543353ede53dc46dafc5a2fd0b0622cd8..d5aa95846e7f52108a03e3731023527281b21d73 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -524,6 +524,11 @@ public class PaperConfig {
@@ -525,6 +525,11 @@ public class PaperConfig {
itemValidationBookPageLength = getInt("settings.item-validation.book.page", itemValidationBookPageLength);
}