diff --git a/patches/server/0003-Leaves-Server-Config.patch b/patches/server/0003-Leaves-Server-Config.patch index 8a780a97..e3970436 100644 --- a/patches/server/0003-Leaves-Server-Config.patch +++ b/patches/server/0003-Leaves-Server-Config.patch @@ -122,10 +122,10 @@ index 34c2ca3571438d84c13fd5a4562ee49ecceb95cb..909f0e1ff837bac4d3213214adee01a1 .withRequiredArg() diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..47a17f5086a2dc4eb9a72ef9a8ab51e09b273e21 +index 0000000000000000000000000000000000000000..1f6bba371f827c1151984f8dc89cc461973988b9 --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -0,0 +1,285 @@ +@@ -0,0 +1,289 @@ +package top.leavesmc.leaves; + +import com.destroystokyo.paper.util.SneakyThrow; @@ -177,8 +177,12 @@ index 0000000000000000000000000000000000000000..47a17f5086a2dc4eb9a72ef9a8ab51e0 + throw new RuntimeException(ex); // unreachable + } + } -+ LeavesConfig.configVersion = LeavesConfig.getInt("config-version-please-do-not-modify-me", CURRENT_CONFIG_VERSION); -+ LeavesConfig.set("config-version-please-do-not-modify-me", CURRENT_CONFIG_VERSION); ++ ++ if (config.contains("config-version-please-do-not-modify-me")) { ++ LeavesConfig.set("config-version-please-do-not-modify-me", null); ++ } ++ LeavesConfig.configVersion = LeavesConfig.getInt("config-version", CURRENT_CONFIG_VERSION); ++ LeavesConfig.set("config-version", CURRENT_CONFIG_VERSION); + + LeavesConfig.load(config); + } diff --git a/patches/server/0006-Player-can-edit-sign.patch b/patches/server/0006-Player-can-edit-sign.patch index 37c7dff7..6cfe8a46 100644 --- a/patches/server/0006-Player-can-edit-sign.patch +++ b/patches/server/0006-Player-can-edit-sign.patch @@ -40,10 +40,10 @@ index ed3d78494735ceda14ad0ea23adeadc374f3b35e..d0e9fd987687d6a0642a9e312668697f if (bl4) { boolean bl6; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 47a17f5086a2dc4eb9a72ef9a8ab51e09b273e21..2527238819b8617fe363ad30c4b39d50c4cebe66 100644 +index 1f6bba371f827c1151984f8dc89cc461973988b9..d5cc421b0fb4739ccaa57ae8b7bc2b7a27f2f391 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -108,6 +108,11 @@ public final class LeavesConfig { +@@ -112,6 +112,11 @@ public final class LeavesConfig { return LeavesConfig.config.getString(path, dfl); } @@ -55,7 +55,7 @@ index 47a17f5086a2dc4eb9a72ef9a8ab51e09b273e21..2527238819b8617fe363ad30c4b39d50 public static final class WorldConfig { public final String worldName; -@@ -141,7 +146,7 @@ public final class LeavesConfig { +@@ -145,7 +150,7 @@ public final class LeavesConfig { public void load() { for (final Method method : LeavesConfig.WorldConfig.class.getDeclaredMethods()) { if (method.getReturnType() != void.class || method.getParameterCount() != 0 || diff --git a/patches/server/0007-Make-snowball-and-egg-can-knockback-player.patch b/patches/server/0007-Make-snowball-and-egg-can-knockback-player.patch index 4b0885f1..f0f304fa 100644 --- a/patches/server/0007-Make-snowball-and-egg-can-knockback-player.patch +++ b/patches/server/0007-Make-snowball-and-egg-can-knockback-player.patch @@ -49,10 +49,10 @@ index 77941e3981e49cf5662b3e3c86a9c419080b17c8..bc9ef36f989f06acac07aa15c8fc624a @Override diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 2527238819b8617fe363ad30c4b39d50c4cebe66..a6e0c237f5d8427c16a9f4c9d272477620b4a478 100644 +index d5cc421b0fb4739ccaa57ae8b7bc2b7a27f2f391..8999a852440c5c15dec5adf892eb60674500f70e 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -113,6 +113,11 @@ public final class LeavesConfig { +@@ -117,6 +117,11 @@ public final class LeavesConfig { playerCanEditSign = getBoolean("settings.player-can-edit-sign", playerCanEditSign); } diff --git a/patches/server/0008-Add-Leaves-Command.patch b/patches/server/0008-Add-Leaves-Command.patch index 05f82496..eb4390be 100644 --- a/patches/server/0008-Add-Leaves-Command.patch +++ b/patches/server/0008-Add-Leaves-Command.patch @@ -29,7 +29,7 @@ index 3fb3fc5b30d3cb171047cfb9caebf064a83f02bc..5b33ca9c6e97dfb8cd60e08272c6bc80 this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index a6e0c237f5d8427c16a9f4c9d272477620b4a478..a3b392c519fc3f85f44a9c383cedb8ae903fb048 100644 +index 8999a852440c5c15dec5adf892eb60674500f70e..a85a5de7d85cf6c5e19c0245c40e6106e6623007 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -4,6 +4,7 @@ import com.destroystokyo.paper.util.SneakyThrow; @@ -58,8 +58,8 @@ index a6e0c237f5d8427c16a9f4c9d272477620b4a478..a3b392c519fc3f85f44a9c383cedb8ae public static void init(final File file) { LeavesConfig.configFile = file; -@@ -53,6 +57,8 @@ public final class LeavesConfig { - LeavesConfig.set("config-version-please-do-not-modify-me", CURRENT_CONFIG_VERSION); +@@ -57,6 +61,8 @@ public final class LeavesConfig { + LeavesConfig.set("config-version", CURRENT_CONFIG_VERSION); LeavesConfig.load(config); + @@ -67,7 +67,7 @@ index a6e0c237f5d8427c16a9f4c9d272477620b4a478..a3b392c519fc3f85f44a9c383cedb8ae } public static void load(final YamlConfiguration config) { -@@ -83,6 +89,12 @@ public final class LeavesConfig { +@@ -87,6 +93,12 @@ public final class LeavesConfig { LeavesConfig.config.set(path, value); } diff --git a/patches/server/0010-Add-fakeplayer-support.patch b/patches/server/0010-Add-fakeplayer-support.patch index 9b095b58..bba33f5d 100644 --- a/patches/server/0010-Add-fakeplayer-support.patch +++ b/patches/server/0010-Add-fakeplayer-support.patch @@ -59,7 +59,7 @@ index 02dc93c394d37c9a84aa4a58d80615c403c54fb9..d93311c3a60e54378b97286bbe7dc73e if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index a3b392c519fc3f85f44a9c383cedb8ae903fb048..b3458de414b62180cba428efbc9d69e881167cc2 100644 +index a85a5de7d85cf6c5e19c0245c40e6106e6623007..1931114944847708ba9e82ce3b82675f1d477446 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -7,6 +7,7 @@ import org.bukkit.Bukkit; @@ -70,7 +70,7 @@ index a3b392c519fc3f85f44a9c383cedb8ae903fb048..b3458de414b62180cba428efbc9d69e8 import java.io.File; import java.lang.reflect.InvocationTargetException; -@@ -59,6 +60,10 @@ public final class LeavesConfig { +@@ -63,6 +64,10 @@ public final class LeavesConfig { LeavesConfig.load(config); commands = new HashMap<>(); @@ -81,7 +81,7 @@ index a3b392c519fc3f85f44a9c383cedb8ae903fb048..b3458de414b62180cba428efbc9d69e8 } public static void load(final YamlConfiguration config) { -@@ -130,6 +135,11 @@ public final class LeavesConfig { +@@ -134,6 +139,11 @@ public final class LeavesConfig { snowballAndEggCanKnockback = getBoolean("settings.snowball-and-egg-can-knockback-player", snowballAndEggCanKnockback); } diff --git a/patches/server/0011-Add-fakeplayer-action-support.patch b/patches/server/0011-Add-fakeplayer-action-support.patch index 8df9176e..5fb7868a 100644 --- a/patches/server/0011-Add-fakeplayer-action-support.patch +++ b/patches/server/0011-Add-fakeplayer-action-support.patch @@ -18,10 +18,10 @@ index 9c767096ca950d55d6002282c7a3fe2884bcd630..dcae420f13a03c6ec0f8d8cb414dc283 if (itemstack.getItem() instanceof SwordItem) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 7c67667a16262f28655b5413d748cca781683717..d4000ba0a8cce6f3da43e813a283665c5c8ba8ab 100644 +index 1931114944847708ba9e82ce3b82675f1d477446..578ef971b3684e64e116b486672b6bc2c9edbe0b 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -63,6 +63,7 @@ public final class LeavesConfig { +@@ -67,6 +67,7 @@ public final class LeavesConfig { if (top.leavesmc.leaves.LeavesConfig.fakeplayerSupport) { commands.put("bot", new BotCommand("bot")); diff --git a/patches/server/0012-Make-shears-in-dispenser-can-unlimited-use.patch b/patches/server/0012-Make-shears-in-dispenser-can-unlimited-use.patch index 9a03cf28..490269e9 100644 --- a/patches/server/0012-Make-shears-in-dispenser-can-unlimited-use.patch +++ b/patches/server/0012-Make-shears-in-dispenser-can-unlimited-use.patch @@ -18,10 +18,10 @@ index 2366d411bf64f88c7296e888cd3bf584825ae4a9..7da29029038d5a007735dcb2be011458 } } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index a8542453f7ec16903afd4c3eac6e266aed7a6114..cb2c3e9329d88a1c38ba4a00fba0025fda68a26e 100644 +index 578ef971b3684e64e116b486672b6bc2c9edbe0b..93e74180d62a326891573e8ac5902e748db25a34 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -141,6 +141,11 @@ public final class LeavesConfig { +@@ -145,6 +145,11 @@ public final class LeavesConfig { fakeplayerSupport = getBoolean("settings.fakeplayer-support", fakeplayerSupport); }