From 5ecc13f8e700dd9ba6486de9d3a43cc4652f5360 Mon Sep 17 00:00:00 2001 From: Telesphoreo Date: Sat, 26 Mar 2022 22:00:15 -0500 Subject: [PATCH] Create 0017-Change-version-fetcher-to-AMG.patch --- .../0017-Change-version-fetcher-to-AMG.patch | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 patches/server/0017-Change-version-fetcher-to-AMG.patch diff --git a/patches/server/0017-Change-version-fetcher-to-AMG.patch b/patches/server/0017-Change-version-fetcher-to-AMG.patch new file mode 100644 index 0000000..be9bb7e --- /dev/null +++ b/patches/server/0017-Change-version-fetcher-to-AMG.patch @@ -0,0 +1,30 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Telesphoreo +Date: Sat, 26 Mar 2022 21:51:07 -0500 +Subject: [PATCH] Change version fetcher to AMG + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java +index ece77f5ea4b14bbed7c070131b3251ea86764538..b91e2b79d85f94ccd041c4260c2a2b23a709ad85 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java ++++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java +@@ -19,7 +19,7 @@ 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"; ++ private static final String GITHUB_BRANCH_NAME = "main"; + private static final String DOWNLOAD_PAGE = "https://papermc.io/downloads"; + private static @Nullable String mcVer; + +@@ -31,8 +31,8 @@ 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-Scissors-".length()).split("[-\\s]"); ++ final Component updateMessage = getUpdateStatusMessage("AtlasMediaGroup/Scissors", GITHUB_BRANCH_NAME, parts[0]); + final Component history = getHistory(); + + return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;