9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00
Files
Leaf/leaf-server/gale-patches/features/0001-Rebrand.patch
2025-05-28 01:19:57 +08:00

52 lines
3.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Wed, 28 May 2025 01:17:34 +0800
Subject: [PATCH] Rebrand
diff --git a/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java b/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java
index 38ecc4a0ea6e9a7f4c3a01077b7fc6f04fa20d80..fcaab9c6e1bab9b6fda8d7e1b4a68711f46aeb32 100644
--- a/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java
+++ b/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java
@@ -40,18 +40,15 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher {
protected static final Logger LOGGER = LogUtils.getClassLogger();
protected static final int DISTANCE_ERROR = -1;
protected static final int DISTANCE_UNKNOWN = -2;
- protected static final ServerBuildInfo BUILD_INFO = ServerBuildInfo.buildInfo();
// Gale start - branding changes - version fetcher
- protected final String gitHubBranchName;
protected final String downloadPage;
protected final String organizationDisplayName;
protected final String projectDisplayName;
protected final String gitHubOrganizationName;
protected final String gitHubRepoName;
- protected AbstractPaperVersionFetcher(String githubBranchName, String downloadPage, String organizationDisplayName, String projectDisplayName, String gitHubOrganizationName, String gitHubRepoName) {
- this.gitHubBranchName = githubBranchName;
+ protected AbstractPaperVersionFetcher(String downloadPage, String organizationDisplayName, String projectDisplayName, String gitHubOrganizationName, String gitHubRepoName) {
this.downloadPage = downloadPage;
this.organizationDisplayName = organizationDisplayName;
this.projectDisplayName = projectDisplayName;
@@ -69,7 +66,7 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher {
public @NotNull Component getVersionMessage(final @NotNull String serverVersion) {
final Component updateMessage;
final ServerBuildInfo build = ServerBuildInfo.buildInfo();
- if (build.buildNumber().isEmpty() && build.gitCommit().isEmpty()) {
+ if (build.buildNumber().isEmpty() || build.gitCommit().isEmpty()) { // Gale - branding changes - version fetcher
updateMessage = text("You are running a development version without access to version information", color(0xFF5300));
} else {
updateMessage = getUpdateStatusMessage(this.gitHubOrganizationName + "/" + this.gitHubRepoName, build); // Gale - branding changes - version fetcher
diff --git a/src/main/java/org/galemc/gale/version/GaleVersionFetcher.java b/src/main/java/org/galemc/gale/version/GaleVersionFetcher.java
index 13de2359d321f2cebdc3a6d179ca27fb43ea5891..0d48c7b58efe3a01822ad207b44bdedaae5d4279 100644
--- a/src/main/java/org/galemc/gale/version/GaleVersionFetcher.java
+++ b/src/main/java/org/galemc/gale/version/GaleVersionFetcher.java
@@ -6,7 +6,6 @@ public class GaleVersionFetcher extends AbstractPaperVersionFetcher {
public GaleVersionFetcher() {
super(
- "ver/1.21.4",
"https://github.com/Dreeam-qwq/Gale",
"GaleMC",
"Gale",