mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
remove pl3x references
This commit is contained in:
@@ -51,32 +51,31 @@ index cd74406039704e5a880f00b9b60bb7b1dedc5398..ef00dddbbf432d3f9f06bc6095ab5a82
|
||||
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 ece77f5ea4b14bbed7c070131b3251ea86764538..aadd6550a5892e403f7b0bbef008461c1566a1bb 100644
|
||||
index ece77f5ea4b14bbed7c070131b3251ea86764538..ff3590ca6c78bc60382d2dab98dc2cb0dd582b35 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||
@@ -19,8 +19,8 @@ import java.util.stream.StreamSupport;
|
||||
@@ -19,8 +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 DOWNLOAD_PAGE = "https://papermc.io/downloads";
|
||||
+ private static final String DOWNLOAD_PAGE = "https://purpur.pl3x.net/downloads/";
|
||||
+ private static final String JENKINS_URL = "https://ci.pl3x.net/job/Purpur/lastSuccessfulBuild/buildNumber"; // Purpur
|
||||
+ private static final String DOWNLOAD_PAGE = "https://purpurmc.org/downloads/"; // Purpur
|
||||
private static @Nullable String mcVer;
|
||||
|
||||
@Override
|
||||
@@ -31,8 +31,8 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
@@ -31,8 +30,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-Purpur-".length()).split("[-\\s]"); // Airplane // Purpur
|
||||
+ final Component updateMessage = getUpdateStatusMessage("pl3xgaming/Purpur", "ver/" + getMinecraftVersion(), parts[0]); // Airplane // Purpur
|
||||
+ final Component updateMessage = getUpdateStatusMessage("PurpurMC/Purpur", "ver/" + getMinecraftVersion(), parts[0]); // Airplane // Purpur
|
||||
final Component history = getHistory();
|
||||
|
||||
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
||||
@@ -45,7 +45,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
@@ -45,7 +44,7 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
String result = matcher.group();
|
||||
mcVer = result.substring(0, result.length() - 2); // strip 'R' anchor and trailing '-'
|
||||
} else {
|
||||
@@ -85,12 +84,12 @@ index ece77f5ea4b14bbed7c070131b3251ea86764538..aadd6550a5892e403f7b0bbef008461c
|
||||
org.bukkit.Bukkit.getLogger().warning("Pattern: " + VER_PATTERN.toString());
|
||||
org.bukkit.Bukkit.getLogger().warning("Version: " + org.bukkit.Bukkit.getBukkitVersion());
|
||||
}
|
||||
@@ -85,15 +85,11 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
@@ -85,15 +84,11 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||
if (siteApiVersion == null) { return -1; }
|
||||
try {
|
||||
try (BufferedReader reader = Resources.asCharSource(
|
||||
- new URL("https://papermc.io/api/v2/projects/paper/versions/" + siteApiVersion),
|
||||
+ new URL("https://api.pl3x.net/v2/purpur/" + siteApiVersion), // Purpur
|
||||
+ new URL("https://api.purpurmc.org/v1/purpur/" + siteApiVersion), // Purpur
|
||||
Charsets.UTF_8
|
||||
).openBufferedStream()) {
|
||||
JsonObject json = new Gson().fromJson(reader, JsonObject.class);
|
||||
|
||||
@@ -173,7 +173,7 @@ index 450518903c0a10301b177d8dd7fe05aca3b8b37e..a10cebac752fdf5186eb86bd314f1931
|
||||
.withRequiredArg()
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..45a99a5fc63ee4d4f166cd47b1db4d412170dbe2
|
||||
index 0000000000000000000000000000000000000000..015428a85dc0f3e6cdd3a4aae405db80aa2a12e8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -0,0 +1,159 @@
|
||||
@@ -213,8 +213,8 @@ index 0000000000000000000000000000000000000000..45a99a5fc63ee4d4f166cd47b1db4d41
|
||||
+ + "If you need help with the configuration or have any questions related to Purpur,\n"
|
||||
+ + "join us in our Discord guild.\n"
|
||||
+ + "\n"
|
||||
+ + "Website: https://github.com/pl3xgaming/Purpur \n"
|
||||
+ + "Wiki: https://github.com/pl3xgaming/Purpur/wiki \n";
|
||||
+ + "Website: https://purpurmc.org \n"
|
||||
+ + "Docs: https://purpurmc.org/docs \n";
|
||||
+ private static File CONFIG_FILE;
|
||||
+ public static YamlConfiguration config;
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user