diff --git a/gradle.properties b/gradle.properties index 1101b5d36c..d2a188ca9d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group = org.purpurmc.purpur version = 1.20.6-R0.1-SNAPSHOT mcVersion = 1.20.6 -paperCommit = 2faa3b2f44c962ce7413e8e3d71e32786851d556 +paperCommit = f17519338bc589c045e0b32bfc37e048b23544d5 org.gradle.caching = true org.gradle.parallel = true diff --git a/patches/api/0001-Rebrand.patch b/patches/api/0001-Rebrand.patch new file mode 100644 index 0000000000..32f36462b4 --- /dev/null +++ b/patches/api/0001-Rebrand.patch @@ -0,0 +1,24 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: granny +Date: Thu, 16 May 2024 19:11:29 -0700 +Subject: [PATCH] Rebrand + + +diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java +index 9df9d09aa477d4cd3c496ba0933c816df1ef0964..7107eabf02d9d9b69d97c978ba421ad52031ec3f 100644 +--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java ++++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java +@@ -18,6 +18,13 @@ public interface ServerBuildInfo { + */ + Key BRAND_PAPER_ID = Key.key("papermc", "paper"); + ++ // Purpur start ++ /** ++ * The brand id for Purpur. ++ */ ++ Key BRAND_PURPUR_ID = Key.key("purpurmc", "purpur"); ++ // Purpur end ++ + /** + * Gets the {@code ServerBuildInfo}. + * diff --git a/patches/api/0001-Purpur-config-files.patch b/patches/api/0002-Purpur-config-files.patch similarity index 91% rename from patches/api/0001-Purpur-config-files.patch rename to patches/api/0002-Purpur-config-files.patch index d175ac5a8d..da3a1e3c3f 100644 --- a/patches/api/0001-Purpur-config-files.patch +++ b/patches/api/0002-Purpur-config-files.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Purpur config files diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 30cbe3bdc7142769019765b03cc4fe1f9ba1ddb4..f5c3c1a0c11dd3518981ce3b86dba8ced8578d9c 100644 +index c8595ffcfcbdd79794d464415287d46acef72b72..607ba7cb902d7053cb570d8f3676ecbadbe56daf 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -2257,6 +2257,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0002-Build-System-Changes.patch b/patches/api/0003-Build-System-Changes.patch similarity index 100% rename from patches/api/0002-Build-System-Changes.patch rename to patches/api/0003-Build-System-Changes.patch diff --git a/patches/api/0003-Purpur-client-support.patch b/patches/api/0004-Purpur-client-support.patch similarity index 100% rename from patches/api/0003-Purpur-client-support.patch rename to patches/api/0004-Purpur-client-support.patch diff --git a/patches/api/0004-Default-permissions.patch b/patches/api/0005-Default-permissions.patch similarity index 100% rename from patches/api/0004-Default-permissions.patch rename to patches/api/0005-Default-permissions.patch diff --git a/patches/api/0005-Ridables.patch b/patches/api/0006-Ridables.patch similarity index 100% rename from patches/api/0005-Ridables.patch rename to patches/api/0006-Ridables.patch diff --git a/patches/api/0006-Allow-inventory-resizing.patch b/patches/api/0007-Allow-inventory-resizing.patch similarity index 100% rename from patches/api/0006-Allow-inventory-resizing.patch rename to patches/api/0007-Allow-inventory-resizing.patch diff --git a/patches/api/0007-Llama-API.patch b/patches/api/0008-Llama-API.patch similarity index 100% rename from patches/api/0007-Llama-API.patch rename to patches/api/0008-Llama-API.patch diff --git a/patches/api/0008-AFK-API.patch b/patches/api/0009-AFK-API.patch similarity index 100% rename from patches/api/0008-AFK-API.patch rename to patches/api/0009-AFK-API.patch diff --git a/patches/api/0009-Bring-back-server-name.patch b/patches/api/0010-Bring-back-server-name.patch similarity index 90% rename from patches/api/0009-Bring-back-server-name.patch rename to patches/api/0010-Bring-back-server-name.patch index 56635c70b4..b598cb8fc3 100644 --- a/patches/api/0009-Bring-back-server-name.patch +++ b/patches/api/0010-Bring-back-server-name.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Bring back server name diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 5d1b55fdbcbe63f6b42b694d05211a3cc691a09d..54f11593f4acfb89623cf1fad58819e001505fd1 100644 +index 71f1c361ebccbe83193c37ec3a90faa4085001c3..20f10b2cfb6f2b1ce7da61a15f7dc4a68b7c5cde 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2910,4 +2910,15 @@ public final class Bukkit { +@@ -2907,4 +2907,15 @@ public final class Bukkit { public static Server.Spigot spigot() { return server.spigot(); } diff --git a/patches/api/0010-ExecuteCommandEvent.patch b/patches/api/0011-ExecuteCommandEvent.patch similarity index 100% rename from patches/api/0010-ExecuteCommandEvent.patch rename to patches/api/0011-ExecuteCommandEvent.patch diff --git a/patches/api/0011-Lagging-threshold.patch b/patches/api/0012-Lagging-threshold.patch similarity index 89% rename from patches/api/0011-Lagging-threshold.patch rename to patches/api/0012-Lagging-threshold.patch index 92c1c64612..38afefd444 100644 --- a/patches/api/0011-Lagging-threshold.patch +++ b/patches/api/0012-Lagging-threshold.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Lagging threshold diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 54f11593f4acfb89623cf1fad58819e001505fd1..215647d7f5cc8487d6a173bc0160fec6db1971eb 100644 +index 20f10b2cfb6f2b1ce7da61a15f7dc4a68b7c5cde..07a79b10ef8b7fa6fd22fbb2652d35ffc9170bfb 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2920,5 +2920,14 @@ public final class Bukkit { +@@ -2917,5 +2917,14 @@ public final class Bukkit { public static String getServerName() { return server.getServerName(); } diff --git a/patches/api/0012-PlayerSetSpawnerTypeWithEggEvent.patch b/patches/api/0013-PlayerSetSpawnerTypeWithEggEvent.patch similarity index 100% rename from patches/api/0012-PlayerSetSpawnerTypeWithEggEvent.patch rename to patches/api/0013-PlayerSetSpawnerTypeWithEggEvent.patch diff --git a/patches/api/0013-Anvil-API.patch b/patches/api/0014-Anvil-API.patch similarity index 100% rename from patches/api/0013-Anvil-API.patch rename to patches/api/0014-Anvil-API.patch diff --git a/patches/api/0014-ItemStack-convenience-methods.patch b/patches/api/0015-ItemStack-convenience-methods.patch similarity index 100% rename from patches/api/0014-ItemStack-convenience-methods.patch rename to patches/api/0015-ItemStack-convenience-methods.patch diff --git a/patches/api/0015-LivingEntity-broadcastItemBreak.patch b/patches/api/0016-LivingEntity-broadcastItemBreak.patch similarity index 100% rename from patches/api/0015-LivingEntity-broadcastItemBreak.patch rename to patches/api/0016-LivingEntity-broadcastItemBreak.patch diff --git a/patches/api/0016-ChatColor-conveniences.patch b/patches/api/0017-ChatColor-conveniences.patch similarity index 100% rename from patches/api/0016-ChatColor-conveniences.patch rename to patches/api/0017-ChatColor-conveniences.patch diff --git a/patches/api/0017-Item-entity-immunities.patch b/patches/api/0018-Item-entity-immunities.patch similarity index 100% rename from patches/api/0017-Item-entity-immunities.patch rename to patches/api/0018-Item-entity-immunities.patch diff --git a/patches/api/0018-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch b/patches/api/0019-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch similarity index 100% rename from patches/api/0018-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch rename to patches/api/0019-Add-predicate-to-recipe-s-ExactChoice-ingredient.patch diff --git a/patches/api/0019-Rabid-Wolf-API.patch b/patches/api/0020-Rabid-Wolf-API.patch similarity index 100% rename from patches/api/0019-Rabid-Wolf-API.patch rename to patches/api/0020-Rabid-Wolf-API.patch diff --git a/patches/api/0020-PlayerBookTooLargeEvent.patch b/patches/api/0021-PlayerBookTooLargeEvent.patch similarity index 100% rename from patches/api/0020-PlayerBookTooLargeEvent.patch rename to patches/api/0021-PlayerBookTooLargeEvent.patch diff --git a/patches/api/0021-Full-netherite-armor-grants-fire-resistance.patch b/patches/api/0022-Full-netherite-armor-grants-fire-resistance.patch similarity index 100% rename from patches/api/0021-Full-netherite-armor-grants-fire-resistance.patch rename to patches/api/0022-Full-netherite-armor-grants-fire-resistance.patch diff --git a/patches/api/0022-Add-EntityTeleportHinderedEvent.patch b/patches/api/0023-Add-EntityTeleportHinderedEvent.patch similarity index 100% rename from patches/api/0022-Add-EntityTeleportHinderedEvent.patch rename to patches/api/0023-Add-EntityTeleportHinderedEvent.patch diff --git a/patches/api/0023-Add-enchantment-target-for-bows-and-crossbows.patch b/patches/api/0024-Add-enchantment-target-for-bows-and-crossbows.patch similarity index 100% rename from patches/api/0023-Add-enchantment-target-for-bows-and-crossbows.patch rename to patches/api/0024-Add-enchantment-target-for-bows-and-crossbows.patch diff --git a/patches/api/0024-API-for-any-mob-to-burn-daylight.patch b/patches/api/0025-API-for-any-mob-to-burn-daylight.patch similarity index 100% rename from patches/api/0024-API-for-any-mob-to-burn-daylight.patch rename to patches/api/0025-API-for-any-mob-to-burn-daylight.patch diff --git a/patches/api/0025-Add-back-player-spawned-endermite-API.patch b/patches/api/0026-Add-back-player-spawned-endermite-API.patch similarity index 100% rename from patches/api/0025-Add-back-player-spawned-endermite-API.patch rename to patches/api/0026-Add-back-player-spawned-endermite-API.patch diff --git a/patches/api/0026-Fix-default-permission-system.patch b/patches/api/0027-Fix-default-permission-system.patch similarity index 100% rename from patches/api/0026-Fix-default-permission-system.patch rename to patches/api/0027-Fix-default-permission-system.patch diff --git a/patches/api/0027-Summoner-API.patch b/patches/api/0028-Summoner-API.patch similarity index 100% rename from patches/api/0027-Summoner-API.patch rename to patches/api/0028-Summoner-API.patch diff --git a/patches/api/0028-Clean-up-version-command-output.patch b/patches/api/0029-Clean-up-version-command-output.patch similarity index 100% rename from patches/api/0028-Clean-up-version-command-output.patch rename to patches/api/0029-Clean-up-version-command-output.patch diff --git a/patches/api/0029-Extended-OfflinePlayer-API.patch b/patches/api/0030-Extended-OfflinePlayer-API.patch similarity index 100% rename from patches/api/0029-Extended-OfflinePlayer-API.patch rename to patches/api/0030-Extended-OfflinePlayer-API.patch diff --git a/patches/api/0030-Added-the-ability-to-add-combustible-items.patch b/patches/api/0031-Added-the-ability-to-add-combustible-items.patch similarity index 93% rename from patches/api/0030-Added-the-ability-to-add-combustible-items.patch rename to patches/api/0031-Added-the-ability-to-add-combustible-items.patch index d5b96b3b94..eb734766b9 100644 --- a/patches/api/0030-Added-the-ability-to-add-combustible-items.patch +++ b/patches/api/0031-Added-the-ability-to-add-combustible-items.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added the ability to add combustible items diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 215647d7f5cc8487d6a173bc0160fec6db1971eb..7bc4e5e9947ab646707a5c0b39c70c0cc6606bd8 100644 +index 07a79b10ef8b7fa6fd22fbb2652d35ffc9170bfb..b99e7e0076448a8b81e3d2d75a451c76f01fc12d 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2929,5 +2929,24 @@ public final class Bukkit { +@@ -2926,5 +2926,24 @@ public final class Bukkit { public static boolean isLagging() { return server.isLagging(); } diff --git a/patches/api/0031-Grindstone-API.patch b/patches/api/0032-Grindstone-API.patch similarity index 100% rename from patches/api/0031-Grindstone-API.patch rename to patches/api/0032-Grindstone-API.patch diff --git a/patches/api/0032-Shears-can-have-looting-enchantment.patch b/patches/api/0033-Shears-can-have-looting-enchantment.patch similarity index 100% rename from patches/api/0032-Shears-can-have-looting-enchantment.patch rename to patches/api/0033-Shears-can-have-looting-enchantment.patch diff --git a/patches/api/0033-Lobotomize-stuck-villagers.patch b/patches/api/0034-Lobotomize-stuck-villagers.patch similarity index 100% rename from patches/api/0033-Lobotomize-stuck-villagers.patch rename to patches/api/0034-Lobotomize-stuck-villagers.patch diff --git a/patches/api/0034-Add-local-difficulty-api.patch b/patches/api/0035-Add-local-difficulty-api.patch similarity index 100% rename from patches/api/0034-Add-local-difficulty-api.patch rename to patches/api/0035-Add-local-difficulty-api.patch diff --git a/patches/api/0035-Remove-Timings.patch b/patches/api/0036-Remove-Timings.patch similarity index 100% rename from patches/api/0035-Remove-Timings.patch rename to patches/api/0036-Remove-Timings.patch diff --git a/patches/api/0036-Add-Bee-API.patch b/patches/api/0037-Add-Bee-API.patch similarity index 100% rename from patches/api/0036-Add-Bee-API.patch rename to patches/api/0037-Add-Bee-API.patch diff --git a/patches/api/0037-Debug-Marker-API.patch b/patches/api/0038-Debug-Marker-API.patch similarity index 99% rename from patches/api/0037-Debug-Marker-API.patch rename to patches/api/0038-Debug-Marker-API.patch index 03d40a25e3..e69f06c97a 100644 --- a/patches/api/0037-Debug-Marker-API.patch +++ b/patches/api/0038-Debug-Marker-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Debug Marker API diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 7bc4e5e9947ab646707a5c0b39c70c0cc6606bd8..70ef8f63ab79e102cb4326c21cc344488f4fbdd3 100644 +index b99e7e0076448a8b81e3d2d75a451c76f01fc12d..75fe3bdbd44440c7cbea45dbd248e260f322dbb2 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -2948,5 +2948,89 @@ public final class Bukkit { +@@ -2945,5 +2945,89 @@ public final class Bukkit { public static void removeFuel(@NotNull Material material) { server.removeFuel(material); } diff --git a/patches/api/0038-Add-death-screen-API.patch b/patches/api/0039-Add-death-screen-API.patch similarity index 100% rename from patches/api/0038-Add-death-screen-API.patch rename to patches/api/0039-Add-death-screen-API.patch diff --git a/patches/api/0039-Language-API.patch b/patches/api/0040-Language-API.patch similarity index 100% rename from patches/api/0039-Language-API.patch rename to patches/api/0040-Language-API.patch diff --git a/patches/api/0040-Add-log-suppression-for-LibraryLoader.patch b/patches/api/0041-Add-log-suppression-for-LibraryLoader.patch similarity index 100% rename from patches/api/0040-Add-log-suppression-for-LibraryLoader.patch rename to patches/api/0041-Add-log-suppression-for-LibraryLoader.patch diff --git a/patches/api/0041-Fire-Immunity-API.patch b/patches/api/0042-Fire-Immunity-API.patch similarity index 100% rename from patches/api/0041-Fire-Immunity-API.patch rename to patches/api/0042-Fire-Immunity-API.patch diff --git a/patches/api/0042-Added-goat-ram-event.patch b/patches/api/0043-Added-goat-ram-event.patch similarity index 100% rename from patches/api/0042-Added-goat-ram-event.patch rename to patches/api/0043-Added-goat-ram-event.patch diff --git a/patches/api/0043-Add-PreExplodeEvents.patch b/patches/api/0044-Add-PreExplodeEvents.patch similarity index 100% rename from patches/api/0043-Add-PreExplodeEvents.patch rename to patches/api/0044-Add-PreExplodeEvents.patch diff --git a/patches/api/0044-Stored-Bee-API.patch b/patches/api/0045-Stored-Bee-API.patch similarity index 100% rename from patches/api/0044-Stored-Bee-API.patch rename to patches/api/0045-Stored-Bee-API.patch diff --git a/patches/api/0045-Explorer-Map-API.patch b/patches/api/0046-Explorer-Map-API.patch similarity index 100% rename from patches/api/0045-Explorer-Map-API.patch rename to patches/api/0046-Explorer-Map-API.patch diff --git a/patches/api/0046-Stonecutter-damage.patch b/patches/api/0047-Stonecutter-damage.patch similarity index 100% rename from patches/api/0046-Stonecutter-damage.patch rename to patches/api/0047-Stonecutter-damage.patch diff --git a/patches/server/0001-Rebrand.patch b/patches/server/0001-Rebrand.patch index 106562bd36..1e7b45bb88 100644 --- a/patches/server/0001-Rebrand.patch +++ b/patches/server/0001-Rebrand.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Rebrand diff --git a/build.gradle.kts b/build.gradle.kts -index 87bb3fd9b97506f61734ae7f2e6860610ba794e7..89f21e21efc5f5ab99d1586f4f3b8f2f3c48ac06 100644 +index 4998aff0b7cb084dcda15c6a18bbe45e99b6000a..d23ecfabf6bf1e355fb2efe5abd80236259ce3c4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -12,7 +12,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { +@@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { val alsoShade: Configuration by configurations.creating dependencies { @@ -17,7 +17,7 @@ index 87bb3fd9b97506f61734ae7f2e6860610ba794e7..89f21e21efc5f5ab99d1586f4f3b8f2f // Paper start implementation("org.jline:jline-terminal-jansi:3.21.0") implementation("net.minecrell:terminalconsoleappender:1.3.0") -@@ -46,6 +46,10 @@ dependencies { +@@ -47,6 +47,10 @@ dependencies { runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18") runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18") @@ -28,16 +28,27 @@ index 87bb3fd9b97506f61734ae7f2e6860610ba794e7..89f21e21efc5f5ab99d1586f4f3b8f2f testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.hamcrest:hamcrest:2.2") -@@ -78,7 +82,7 @@ tasks.jar { +@@ -80,14 +84,14 @@ tasks.jar { + val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper attributes( "Main-Class" to "org.bukkit.craftbukkit.Main", - "Implementation-Title" to "CraftBukkit", -- "Implementation-Version" to "git-Paper-$implementationVersion", -+ "Implementation-Version" to "git-Purpur-$implementationVersion", // Pufferfish // Purpur +- "Implementation-Title" to "Paper", ++ "Implementation-Title" to "Purpur", // Purpur + "Implementation-Version" to implementationVersion, "Implementation-Vendor" to date, // Paper - "Specification-Title" to "Bukkit", +- "Specification-Title" to "Paper", ++ "Specification-Title" to "Purpur", // Purpur "Specification-Version" to project.version, -@@ -137,7 +141,7 @@ fun TaskContainer.registerRunTask( +- "Specification-Vendor" to "Paper Team", +- "Brand-Id" to "papermc:paper", +- "Brand-Name" to "Paper", ++ "Specification-Vendor" to "Purpur Team", // Purpur ++ "Brand-Id" to "purpurmc:purpur", // Purpur ++ "Brand-Name" to "Purpur", // Purpur + "Build-Number" to (build ?: ""), + "Build-Time" to Instant.now().toString(), + "Git-Branch" to gitBranch, // Paper +@@ -144,7 +148,7 @@ fun TaskContainer.registerRunTask( name: String, block: JavaExec.() -> Unit ): TaskProvider = register(name) { @@ -47,97 +58,78 @@ index 87bb3fd9b97506f61734ae7f2e6860610ba794e7..89f21e21efc5f5ab99d1586f4f3b8f2f standardInput = System.`in` workingDir = rootProject.layout.projectDirectory diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java -index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..462a6eed350fd660ddaf25d567bb6e97b77d0b2b 100644 +index 532306cacd52579cdf37e4aca25887b1ed3ba6a1..af5890e6d915cc60cf19fc531022699599450493 100644 --- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java +++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java -@@ -19,8 +19,10 @@ import java.util.stream.StreamSupport; - - public class PaperVersionFetcher implements VersionFetcher { - private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end -- private static final String GITHUB_BRANCH_NAME = "master"; +@@ -35,7 +35,10 @@ public class PaperVersionFetcher implements VersionFetcher { + private static final Logger LOGGER = LogUtils.getClassLogger(); + private static final int DISTANCE_ERROR = -1; + private static final int DISTANCE_UNKNOWN = -2; - private static final String DOWNLOAD_PAGE = "https://papermc.io/downloads/paper"; + // Purpur start + private static final String DOWNLOAD_PAGE = "https://purpurmc.org/downloads"; -+ private static int distance = -2; public int distance() { return distance; } ++ private static int distance = DISTANCE_UNKNOWN; public int distance() { return distance; } + // Purpur end - private static @Nullable String mcVer; @Override -@@ -31,11 +33,11 @@ public class PaperVersionFetcher implements VersionFetcher { - @Nonnull - @Override - public Component getVersionMessage(@Nonnull String serverVersion) { -- String[] parts = serverVersion.substring("git-Paper-".length()).split("[-\\s]"); -- final Component updateMessage = getUpdateStatusMessage("PaperMC/Paper", GITHUB_BRANCH_NAME, parts[0]); -+ String[] parts = serverVersion.substring("git-Purpur-".length()).split("[-\\s]"); // Purpur -+ final Component updateMessage = getUpdateStatusMessage("PurpurMC/Purpur", "ver/" + getMinecraftVersion(), parts[0]); // Purpur - final Component history = getHistory(); + public long getCacheTime() { +@@ -49,7 +52,7 @@ public class PaperVersionFetcher implements VersionFetcher { + if (build.buildNumber().isEmpty() && build.gitCommit().isEmpty()) { + updateMessage = text("You are running a development version without access to version information", color(0xFF5300)); + } else { +- updateMessage = getUpdateStatusMessage("PaperMC/Paper", build); ++ updateMessage = getUpdateStatusMessage("PurpurMC/Purpur", build); // Purpur + } + final @Nullable Component history = this.getHistory(); -- return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage; -+ return history != null ? Component.join(net.kyori.adventure.text.JoinConfiguration.separator(Component.newline()), history, updateMessage) : updateMessage; // Purpur +@@ -57,7 +60,7 @@ public class PaperVersionFetcher implements VersionFetcher { } - private static @Nullable String getMinecraftVersion() { -@@ -45,7 +47,7 @@ public class PaperVersionFetcher implements VersionFetcher { - String result = matcher.group(); - mcVer = result.substring(0, result.length() - 2); // strip 'R' anchor and trailing '-' - } else { -- org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to PaperMC!"); -+ org.bukkit.Bukkit.getLogger().warning("Unable to match version to pattern! Report to Purpur!"); // Purpur - org.bukkit.Bukkit.getLogger().warning("Pattern: " + VER_PATTERN.toString()); - org.bukkit.Bukkit.getLogger().warning("Version: " + org.bukkit.Bukkit.getBukkitVersion()); - } -@@ -55,7 +57,7 @@ public class PaperVersionFetcher implements VersionFetcher { - } + private static Component getUpdateStatusMessage(final String repo, final ServerBuildInfo build) { +- int distance = DISTANCE_ERROR; ++ //int distance = DISTANCE_ERROR; // Purpur - use field - private static Component getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) { -- int distance; -+ //int distance; // Purpur - use field - try { - int jenkinsBuild = Integer.parseInt(versionInfo); - distance = fetchDistanceFromSiteApi(jenkinsBuild, getMinecraftVersion()); -@@ -66,13 +68,13 @@ public class PaperVersionFetcher implements VersionFetcher { + final OptionalInt buildNumber = build.buildNumber(); + if (buildNumber.isPresent()) { +@@ -71,10 +74,10 @@ public class PaperVersionFetcher implements VersionFetcher { + } - switch (distance) { - case -1: -- return Component.text("Error obtaining version information", NamedTextColor.YELLOW); -+ return Component.text("* Error obtaining version information", NamedTextColor.RED); // Purpur - case 0: -- return Component.text("You are running the latest version", NamedTextColor.GREEN); -+ return Component.text("* You are running the latest version", NamedTextColor.GREEN); // Purpur - case -2: -- return Component.text("Unknown version", NamedTextColor.YELLOW); -+ return Component.text("* Unknown version", NamedTextColor.YELLOW); // Purpur - default: -- return Component.text("You are " + distance + " version(s) behind", NamedTextColor.YELLOW) -+ return Component.text("* You are " + distance + " version(s) behind", NamedTextColor.YELLOW) // Purpur - .append(Component.newline()) - .append(Component.text("Download the new version at: ") - .append(Component.text(DOWNLOAD_PAGE, NamedTextColor.GOLD) -@@ -85,15 +87,11 @@ public class PaperVersionFetcher implements VersionFetcher { - if (siteApiVersion == null) { return -1; } + return switch (distance) { +- case DISTANCE_ERROR -> text("Error obtaining version information", NamedTextColor.YELLOW); +- case 0 -> text("You are running the latest version", NamedTextColor.GREEN); +- case DISTANCE_UNKNOWN -> text("Unknown version", NamedTextColor.YELLOW); +- default -> text("You are " + distance + " version(s) behind", NamedTextColor.YELLOW) ++ case DISTANCE_ERROR -> text("* Error obtaining version information", NamedTextColor.RED); // Purpur ++ case 0 -> text("* You are running the latest version", NamedTextColor.GREEN); // Purpur ++ case DISTANCE_UNKNOWN -> text("* Unknown version", NamedTextColor.YELLOW); // Purpur ++ default -> text("* You are " + distance + " version(s) behind", NamedTextColor.YELLOW) // Purpur + .append(Component.newline()) + .append(text("Download the new version at: ") + .append(text(DOWNLOAD_PAGE, NamedTextColor.GOLD) +@@ -86,15 +89,12 @@ public class PaperVersionFetcher implements VersionFetcher { + private static int fetchDistanceFromSiteApi(final ServerBuildInfo build, final int jenkinsBuild) { try { - try (BufferedReader reader = Resources.asCharSource( -- new URL("https://api.papermc.io/v2/projects/paper/versions/" + siteApiVersion), -+ new URL("https://api.purpurmc.org/v2/purpur/" + siteApiVersion), // Purpur + try (final BufferedReader reader = Resources.asCharSource( +- URI.create("https://api.papermc.io/v2/projects/paper/versions/" + build.minecraftVersionId()).toURL(), ++ URI.create("https://api.purpurmc.org/v2/purpur/" + build.minecraftVersionId()).toURL(), // Purpur Charsets.UTF_8 ).openBufferedStream()) { - JsonObject json = new Gson().fromJson(reader, JsonObject.class); -- JsonArray builds = json.getAsJsonArray("builds"); -- int latest = StreamSupport.stream(builds.spliterator(), false) -- .mapToInt(e -> e.getAsInt()) + final JsonObject json = new Gson().fromJson(reader, JsonObject.class); + final JsonArray builds = json.getAsJsonArray("builds"); +- final int latest = StreamSupport.stream(builds.spliterator(), false) +- .mapToInt(JsonElement::getAsInt) - .max() -- .getAsInt(); -+ int latest = json.getAsJsonObject("builds").getAsJsonPrimitive("latest").getAsInt(); // Purpur +- .orElseThrow(); ++ final int latest = json.getAsJsonObject("builds").getAsJsonPrimitive("latest").getAsInt(); // Purpur return latest - jenkinsBuild; - } catch (JsonSyntaxException ex) { - ex.printStackTrace(); -@@ -144,6 +142,6 @@ public class PaperVersionFetcher implements VersionFetcher { + } catch (final JsonSyntaxException ex) { + LOGGER.error("Error parsing json from Paper's downloads API", ex); +@@ -141,6 +141,6 @@ public class PaperVersionFetcher implements VersionFetcher { return null; } -- return Component.text("Previous version: " + oldVersion, NamedTextColor.GRAY, TextDecoration.ITALIC); -+ return org.bukkit.ChatColor.parseMM("Previous: %s", oldVersion); // Purpur +- return text("Previous version: " + oldVersion, NamedTextColor.GRAY, TextDecoration.ITALIC); ++ return text("Previous: " + oldVersion, NamedTextColor.GRAY); // Purpur } } diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java @@ -153,6 +145,39 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..3cb56595822799926a8141e60a42f5d1 .variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history")) .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); +diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java +index 790bad0494454ca12ee152e3de6da3da634d9b20..a6e5950b5875cafd734300cdfbf58f5d3736f3c8 100644 +--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java ++++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java +@@ -31,6 +31,7 @@ public record ServerBuildInfoImpl( + private static final String ATTRIBUTE_GIT_COMMIT = "Git-Commit"; + + private static final String BRAND_PAPER_NAME = "Paper"; ++ private static final String BRAND_PURPUR_NAME = "Purpur"; // Purpur + + private static final String BUILD_DEV = "DEV"; + +@@ -42,9 +43,9 @@ public record ServerBuildInfoImpl( + this( + getManifestAttribute(manifest, ATTRIBUTE_BRAND_ID) + .map(Key::key) +- .orElse(BRAND_PAPER_ID), ++ .orElse(BRAND_PURPUR_ID), // Purpur + getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME) +- .orElse(BRAND_PAPER_NAME), ++ .orElse(BRAND_PURPUR_NAME), // Purpur + SharedConstants.getCurrentVersion().getId(), + SharedConstants.getCurrentVersion().getName(), + getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER) +@@ -61,7 +62,7 @@ public record ServerBuildInfoImpl( + + @Override + public boolean isBrandCompatible(final @NotNull Key brandId) { +- return brandId.equals(this.brandId); ++ return brandId.equals(this.brandId) || brandId.equals(BRAND_PAPER_ID); // Purpur + } + + @Override diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java index 4f3cc14d48690bb183d09bb7a5ba1e23e8a0c08a..c366d84518979e842a6f10f969a5951539ecac93 100644 --- a/src/main/java/net/minecraft/CrashReport.java @@ -169,10 +194,10 @@ index 4f3cc14d48690bb183d09bb7a5ba1e23e8a0c08a..c366d84518979e842a6f10f969a59515 stringbuilder.append(CrashReport.getErrorComment()); stringbuilder.append("\n\n"); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 39303bb4e336732db0ab19dee0c1f8b609bbb134..7483be7ff59e80aa6605dc19f18bb54473e3540e 100644 +index dbc86b8d4d2af6e5f7e678f2bb77fd39b85c04c5..989de328a8dd26486d65245d2737d9789d936e8a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -962,7 +962,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop // Pufferfish > // Paper - } - - public SystemReport fillSystemReport(SystemReport details) { -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index da1aed63af837b193900bb85393611edbd56c363..4f454c5d70e7333429557eb86e38e0f2c22af380 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -269,7 +269,7 @@ import javax.annotation.Nullable; // Paper - import javax.annotation.Nonnull; // Paper - - public final class CraftServer implements Server { -- private final String serverName = "Paper"; // Paper -+ private final String serverName = "Purpur"; // Paper // Pufferfish // Purpur - private final String serverVersion; - private final String bukkitVersion = Versioning.getBukkitVersion(); - private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java index 4e56018b64d11f76c8da43fd8f85c6de72204e36..9607675e6c5bff2183c4420d11fc63eeb5747fb6 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java @@ -244,7 +247,7 @@ index e85b9bb3f9c225d289a4959921970b9963881199..c1e2d3a75b9d4710ab6d8b5c62af4bc1 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 74c5c0e63a3c41174967c1be1da01e60e458f12f..8c62796dacf79dbe7ac228ac04ea478679466fd4 100644 +index 5a382907285a288f2a223189e690d3dbdf45594c..3daf674f1e0de3fdd89db5536cc1e34140a5abb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -511,7 +511,7 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0002-Purpur-config-files.patch b/patches/server/0002-Purpur-config-files.patch index 623cd4a0d8..5f301ba79f 100644 --- a/patches/server/0002-Purpur-config-files.patch +++ b/patches/server/0002-Purpur-config-files.patch @@ -112,10 +112,10 @@ index b4ef3ad2c17168085372f1fe46809f02d9dfe74a..04f7f6743aabdca54892b2b155386f86 this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4f454c5d70e7333429557eb86e38e0f2c22af380..21cc03794429e66edc3b9f0a4ed98b66dbba078c 100644 +index 2fa5507aa2153a05208077f9547c165a1099b5bb..97e7f9d08dd41630e8ebf610f23d5b37b820db1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1038,6 +1038,7 @@ public final class CraftServer implements Server { +@@ -1033,6 +1033,7 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot this.console.paperConfigurations.reloadConfigs(this.console); @@ -123,7 +123,7 @@ index 4f454c5d70e7333429557eb86e38e0f2c22af380..21cc03794429e66edc3b9f0a4ed98b66 for (ServerLevel world : this.console.getAllLevels()) { // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) -@@ -1053,6 +1054,7 @@ public final class CraftServer implements Server { +@@ -1048,6 +1049,7 @@ public final class CraftServer implements Server { } } world.spigotConfig.init(); // Spigot @@ -131,7 +131,7 @@ index 4f454c5d70e7333429557eb86e38e0f2c22af380..21cc03794429e66edc3b9f0a4ed98b66 } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper -@@ -1069,6 +1071,7 @@ public final class CraftServer implements Server { +@@ -1064,6 +1066,7 @@ public final class CraftServer implements Server { this.reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper @@ -139,7 +139,7 @@ index 4f454c5d70e7333429557eb86e38e0f2c22af380..21cc03794429e66edc3b9f0a4ed98b66 this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -3039,6 +3042,18 @@ public final class CraftServer implements Server { +@@ -3034,6 +3037,18 @@ public final class CraftServer implements Server { return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console); } @@ -159,10 +159,10 @@ index 4f454c5d70e7333429557eb86e38e0f2c22af380..21cc03794429e66edc3b9f0a4ed98b66 public void restart() { org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c988afa496d25314451435eedd64079a0d87cef0..45a33086e1bb8a70e0fa01090731d27a0474da41 100644 +index e02102280ed1dc300191d19bbca8f00e17701753..fe181ec5f8e968ff78e694f7a213c7aac718704c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -175,6 +175,14 @@ public class Main { +@@ -176,6 +176,14 @@ public class Main { .describedAs("Jar file"); // Paper end diff --git a/patches/server/0006-Ridables.patch b/patches/server/0006-Ridables.patch index f7997b8620..b6f22c9020 100644 --- a/patches/server/0006-Ridables.patch +++ b/patches/server/0006-Ridables.patch @@ -22,10 +22,10 @@ index 665e88b2dedf9d5bb50914d5f3d377f2d19f40b0..f70a80b496bd1498778e82fc221c3b1b super(x, y, z); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7483be7ff59e80aa6605dc19f18bb54473e3540e..e02ae9c2c510ff2564f46e6d6d69465d0c4dabed 100644 +index 989de328a8dd26486d65245d2737d9789d936e8a..71f1f9a9a395b17398941a4bb35e2d143a62a1f5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1764,6 +1764,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - Add EntityMoveEvent net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers worldserver.updateLagCompensationTick(); // Paper - lag compensation diff --git a/patches/server/0011-Bring-back-server-name.patch b/patches/server/0011-Bring-back-server-name.patch index 21a6325838..3319bde812 100644 --- a/patches/server/0011-Bring-back-server-name.patch +++ b/patches/server/0011-Bring-back-server-name.patch @@ -17,10 +17,10 @@ index 9d10cdacb3aed2c00dc60aeb6f2cbeb48905e21f..842f382de43df5d5c321422372ec30cc public final boolean spawnNpcs = this.get("spawn-npcs", true); public final boolean pvp = this.get("pvp", true); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 21cc03794429e66edc3b9f0a4ed98b66dbba078c..fb430d21889e90597160fc11b0d0bc59b6b85ffc 100644 +index 97e7f9d08dd41630e8ebf610f23d5b37b820db1b..7edceb03bf1db24892dd311c31edb75a223011f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -3284,4 +3284,11 @@ public final class CraftServer implements Server { +@@ -3279,4 +3279,11 @@ public final class CraftServer implements Server { return this.potionBrewer; } // Paper end diff --git a/patches/server/0012-Configurable-server-mod-name.patch b/patches/server/0012-Configurable-server-mod-name.patch index 76b13582f9..cbe9427aa4 100644 --- a/patches/server/0012-Configurable-server-mod-name.patch +++ b/patches/server/0012-Configurable-server-mod-name.patch @@ -5,27 +5,27 @@ Subject: [PATCH] Configurable server mod name diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index e02ae9c2c510ff2564f46e6d6d69465d0c4dabed..27a1948b97f5a20b64849ebda7b485b229ed7bce 100644 +index 71f1f9a9a395b17398941a4bb35e2d143a62a1f5..537726b345038e045172a42464ea166353515868 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1927,7 +1927,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop // Pufferfish > // Paper -+ return org.purpurmc.purpur.PurpurConfig.serverModName; // Purpur - Purpur > // Pufferfish > // Paper +- return io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper ++ return org.purpurmc.purpur.PurpurConfig.serverModName; // Paper // Purpur } public SystemReport fillSystemReport(SystemReport details) { diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index d2f3e864aa4d1c5d3ee8bb8f1e36787b1ca45f2e..1701580d6f09cab9088db28254afd70a63dee7fb 100644 +index d2f3e864aa4d1c5d3ee8bb8f1e36787b1ca45f2e..fdf726c455f9a4de822644c703de7ffeab6b3702 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -188,6 +188,11 @@ public class PurpurConfig { afkTabListSuffix = MiniMessage.miniMessage().serialize(MiniMessage.miniMessage().deserialize(getString("settings.messages.afk-tab-list-suffix", afkTabListSuffix))); } -+ public static String serverModName = "Purpur"; ++ public static String serverModName = io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); + private static void serverModName() { + serverModName = getString("settings.server-mod-name", serverModName); + } diff --git a/patches/server/0013-Lagging-threshold.patch b/patches/server/0013-Lagging-threshold.patch index eebc03180f..e8eff07cfd 100644 --- a/patches/server/0013-Lagging-threshold.patch +++ b/patches/server/0013-Lagging-threshold.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Lagging threshold diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 27a1948b97f5a20b64849ebda7b485b229ed7bce..d55adf4db46c89d9ce387036856ebb0305cbc412 100644 +index 537726b345038e045172a42464ea166353515868..5aabb74e0fd49a7ab97d324f9fa7bfc26527af00 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -315,6 +315,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop transaction = new java.util.ArrayList(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3b87a30e247002cc6caaa27aa870626f6bd1354a..f01763d5f00a8f8c72dec699009b035bf3414fdf 100644 +index a3ab5eaf8f9b999bfc6b3674a68450a0efeec7e8..9b707ac3a5516f1590afeee73566d0e57ff3050c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1580,6 +1580,19 @@ public final class CraftServer implements Server { +@@ -1575,6 +1575,19 @@ public final class CraftServer implements Server { return true; } diff --git a/patches/server/0212-UPnP-Port-Forwarding.patch b/patches/server/0212-UPnP-Port-Forwarding.patch index dac92bf1e6..6ed0861a5e 100644 --- a/patches/server/0212-UPnP-Port-Forwarding.patch +++ b/patches/server/0212-UPnP-Port-Forwarding.patch @@ -5,10 +5,10 @@ Subject: [PATCH] UPnP Port Forwarding diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 71c506a43e69f7c0c74947387fa6376e9f7343e7..f7f97c2c5fbd03d8c87efa2d1a4e7c93667d2be1 100644 +index bac978e042a1049cc66048a951b068793b855427..b08c508c0577adcea88a433211108a11edb72473 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -317,6 +317,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { entityplayer.connection.suspendFlushing(); }); @@ -153,7 +153,7 @@ index 7c016118b410b8c041aa4e0cc0928aa978a4b5d6..1fbbf1ff63a186099f47b9c478dead3e // Paper start - Folia scheduler API ((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick(); getAllLevels().forEach(level -> { -@@ -1745,21 +1745,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % autosavePeriod == 0; try { this.isSaving = true; -@@ -1626,7 +1626,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Purpur @@ -242,7 +242,7 @@ index 1fbbf1ff63a186099f47b9c478dead3e416099ee..642627e37014d5bf634ea7a153ce1abf try { //worldserver.timings.doTick.startTiming(); // Spigot // Purpur -@@ -1822,17 +1822,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { this.executeBlocking(() -> { this.saveDebugReport(path.resolve("server")); -@@ -2843,40 +2844,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop