mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-27 07:05:39 +00:00
35 lines
1.9 KiB
Diff
35 lines
1.9 KiB
Diff
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||
|
From: Telesphoreo <me@telesphoreo.me>
|
||
|
Date: Tue, 19 Apr 2022 19:35:31 -0500
|
||
|
Subject: [PATCH] Attempt to fix updater
|
||
|
|
||
|
|
||
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||
|
index 153c06bc00c4619012e77cb496ac57a7f2fc9409..d8ae4145c3a69359788103afa184b08c691fa454 100644
|
||
|
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||
|
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||
|
@@ -35,7 +35,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||
|
@Override
|
||
|
public Component getVersionMessage(@Nonnull String serverVersion) {
|
||
|
String[] parts = serverVersion.substring("git-Scissors-".length()).split("[-\\s]");
|
||
|
- final Component updateMessage = getUpdateStatusMessage("AtlasMediaGroup/Scissors", GITHUB_BRANCH_NAME, parts[0]);
|
||
|
+ final Component updateMessage = getUpdateStatusMessage("AtlasMediaGroup/Scissors", GITHUB_BRANCH_NAME);
|
||
|
final Component history = getHistory();
|
||
|
|
||
|
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
||
|
@@ -69,11 +69,10 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||
|
}
|
||
|
// Scissors end
|
||
|
|
||
|
- private static Component getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch, @Nonnull String versionInfo) {
|
||
|
- int distance;
|
||
|
+ // Scissors - remove versionInfo from paramters
|
||
|
+ private static Component getUpdateStatusMessage(@Nonnull String repo, @Nonnull String branch) {
|
||
|
// Scissors start - always use Git for version checking
|
||
|
- versionInfo = getCommit();
|
||
|
- distance = fetchDistanceFromGitHub(repo, branch, versionInfo);
|
||
|
+ int distance = fetchDistanceFromGitHub(repo, branch, getMinecraftVersion());
|
||
|
// Scissors end
|
||
|
|
||
|
switch (distance) {
|