mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
79 lines
3.2 KiB
Diff
79 lines
3.2 KiB
Diff
From 54a9be260f9d24b37ddf635cd8b7cfee6ab99bf5 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Sat, 4 May 2019 00:57:16 -0500
|
|
Subject: [PATCH] Rebrand
|
|
|
|
---
|
|
pom.xml | 8 +++----
|
|
.../command/defaults/VersionCommand.java | 21 +++++++++++--------
|
|
2 files changed, 16 insertions(+), 13 deletions(-)
|
|
|
|
diff --git a/pom.xml b/pom.xml
|
|
index 13cdc25f..1e24fd1e 100644
|
|
--- a/pom.xml
|
|
+++ b/pom.xml
|
|
@@ -4,17 +4,17 @@
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
- <groupId>com.destroystokyo.paper</groupId>
|
|
- <artifactId>paper-parent</artifactId>
|
|
+ <groupId>net.pl3x.purpur</groupId>
|
|
+ <artifactId>purpur-parent</artifactId>
|
|
<version>dev-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
- <artifactId>paper-api</artifactId>
|
|
+ <artifactId>purpur-api</artifactId>
|
|
<version>1.13.2-R0.1-SNAPSHOT</version>
|
|
<packaging>jar</packaging>
|
|
|
|
<name>Paper-API</name>
|
|
- <url>https://github.com/PaperMC/Paper</url>
|
|
+ <url>https://github.com/pl3xgaming/Purpur</url>
|
|
<description>An enhanced plugin API for Minecraft servers.</description>
|
|
|
|
<properties>
|
|
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
|
index ee07fe5e..0c4e8604 100644
|
|
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
|
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
|
@@ -214,8 +214,8 @@ public class VersionCommand extends BukkitCommand {
|
|
private void obtainVersion() {
|
|
String version = Bukkit.getVersion();
|
|
if (version == null) version = "Custom";
|
|
- if (version.startsWith("git-Paper-")) {
|
|
- String[] parts = version.substring("git-Paper-".length()).split("[-\\s]");
|
|
+ if (version.startsWith("git-Purpur-")) { // Purpur
|
|
+ String[] parts = version.substring("git-Purpur-".length()).split("[-\\s]"); // Purpur
|
|
int distance = getDistance(null, parts[0]);
|
|
switch (distance) {
|
|
case -1:
|
|
@@ -266,13 +266,16 @@ public class VersionCommand extends BukkitCommand {
|
|
|
|
// Paper start
|
|
private static int getDistance(@NotNull String repo, @NotNull String verInfo) {
|
|
- try {
|
|
- int currentVer = Integer.decode(verInfo);
|
|
- return getFromJenkins(currentVer);
|
|
- } catch (NumberFormatException ex) {
|
|
- verInfo = verInfo.replace("\"", "");
|
|
- return getFromRepo("PaperMC/Paper", "master", verInfo);
|
|
- }
|
|
+ // Purpur start
|
|
+ //try {
|
|
+ // int currentVer = Integer.decode(verInfo);
|
|
+ // return getFromJenkins(currentVer);
|
|
+ //} catch (NumberFormatException ex) {
|
|
+ // verInfo = verInfo.replace("\"", "");
|
|
+ // return getFromRepo("PaperMC/Paper", "master", verInfo);
|
|
+ //}
|
|
+ return getFromRepo("pl3xgaming/Purpur", "master", verInfo.replace("\"", ""));
|
|
+ // Purpur end
|
|
/*
|
|
BufferedReader reader = Resources.asCharSource(
|
|
new URL("https://hub.spigotmc.org/stash/rest/api/1.0/projects/SPIGOT/repos/" + repo + "/commits?since=" + URLEncoder.encode(hash, "UTF-8") + "&withCounts=true"),
|
|
--
|
|
2.20.1
|
|
|