mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Rebrand Purpur
This commit is contained in:
79
patches/api/0001-Rebrand-Purpur.patch
Normal file
79
patches/api/0001-Rebrand-Purpur.patch
Normal file
@@ -0,0 +1,79 @@
|
||||
From 975b3da44f75bddc4b25e99fc92fadd3041693ff Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 30 Apr 2019 13:50:41 -0600
|
||||
Subject: [PATCH] Rebrand Purpur
|
||||
|
||||
---
|
||||
pom.xml | 10 ++++-----
|
||||
.../command/defaults/VersionCommand.java | 21 +++++++++++--------
|
||||
2 files changed, 17 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 3347be41..c6b3aaec 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>
|
||||
+ <name>Purpur-API</name>
|
||||
+ <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 5cebb245..e3efafdc 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -207,8 +207,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:
|
||||
@@ -259,13 +259,16 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
// Paper start
|
||||
private static int getDistance(String repo, 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
|
||||
|
||||
140
patches/server/0001-Rebrand-Purpur.patch
Normal file
140
patches/server/0001-Rebrand-Purpur.patch
Normal file
@@ -0,0 +1,140 @@
|
||||
From 3597fc2ef74857fbb88d3ee4b299557566308490 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Tue, 30 Apr 2019 14:08:58 -0600
|
||||
Subject: [PATCH] Rebrand Purpur
|
||||
|
||||
---
|
||||
pom.xml | 18 +++++++++---------
|
||||
.../paper/console/PaperConsole.java | 2 +-
|
||||
src/main/java/net/minecraft/server/EULA.java | 2 +-
|
||||
.../net/minecraft/server/MinecraftServer.java | 2 +-
|
||||
.../org/bukkit/craftbukkit/CraftServer.java | 2 +-
|
||||
.../bukkit/craftbukkit/util/Versioning.java | 2 +-
|
||||
6 files changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index c3844581..860bd355 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,11 +1,11 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
- <artifactId>paper</artifactId>
|
||||
+ <artifactId>purpur</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.13.2-R0.1-SNAPSHOT</version>
|
||||
- <name>Paper</name>
|
||||
- <url>https://papermc.io</url>
|
||||
+ <name>Purpur</name>
|
||||
+ <url>http://pl3x.net</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
@@ -20,16 +20,16 @@
|
||||
</properties>
|
||||
|
||||
<parent>
|
||||
- <groupId>com.destroystokyo.paper</groupId>
|
||||
- <artifactId>paper-parent</artifactId>
|
||||
+ <groupId>net.pl3x.purpur</groupId>
|
||||
+ <artifactId>purpur-parent</artifactId>
|
||||
<version>dev-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
- <groupId>com.destroystokyo.paper</groupId>
|
||||
- <artifactId>paper-api</artifactId>
|
||||
+ <groupId>net.pl3x.purpur</groupId>
|
||||
+ <artifactId>purpur-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
<!-- This builds a completely 'ready to start' jar with all dependencies inside -->
|
||||
<build>
|
||||
- <finalName>paper-${minecraft.version}</finalName>
|
||||
+ <finalName>purpur-${minecraft.version}</finalName>
|
||||
<defaultGoal>clean install</defaultGoal> <!-- Paper -->
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -143,7 +143,7 @@
|
||||
<artifactId>gitdescribe-maven-plugin</artifactId>
|
||||
<version>1.3</version>
|
||||
<configuration>
|
||||
- <outputPrefix>git-Paper-</outputPrefix>
|
||||
+ <outputPrefix>git-Purpur-</outputPrefix>
|
||||
<scmDirectory>..</scmDirectory>
|
||||
</configuration>
|
||||
<executions>
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
index 688b4715..e4522e68 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
||||
@@ -17,7 +17,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
||||
@Override
|
||||
protected LineReader buildReader(LineReaderBuilder builder) {
|
||||
return super.buildReader(builder
|
||||
- .appName("Paper")
|
||||
+ .appName("Purpur") // Purpur
|
||||
.completer(new ConsoleCommandCompleter(this.server))
|
||||
);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
|
||||
index 526f3af5..b64cac25 100644
|
||||
--- a/src/main/java/net/minecraft/server/EULA.java
|
||||
+++ b/src/main/java/net/minecraft/server/EULA.java
|
||||
@@ -49,7 +49,7 @@ public class EULA {
|
||||
Properties properties = new Properties();
|
||||
fileoutputstream = new FileOutputStream(this.b);
|
||||
properties.setProperty("eula", "false");
|
||||
- properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag);
|
||||
+ properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).");
|
||||
} catch (Exception exception) {
|
||||
a.warn("Failed to save {}", this.b, exception);
|
||||
} finally {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9c8c3304..570360f5 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1347,7 +1347,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
- return "Paper"; //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||
+ return "Purpur"; // Purpur // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||
}
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 32bf4e58..fc7084ee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -164,7 +164,7 @@ import javax.annotation.Nonnull; // Paper
|
||||
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
- private final String serverName = "Paper"; // Paper
|
||||
+ private final String serverName = "Purpur"; // Purpur // Paper
|
||||
private final String serverVersion;
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 674096ca..e9aee2d8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
@@ -11,7 +11,7 @@ public final class Versioning {
|
||||
public static String getBukkitVersion() {
|
||||
String result = "Unknown-Version";
|
||||
|
||||
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.destroystokyo.paper/paper-api/pom.properties");
|
||||
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/net.pl3x.purpur/purpur-api/pom.properties"); // Purpur
|
||||
Properties properties = new Properties();
|
||||
|
||||
if (stream != null) {
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Reference in New Issue
Block a user