2021-06-12 18:04:04 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2022-04-19 23:21:18 +00:00
|
|
|
From: Telesphoreo <me@telesphoreo.me>
|
2022-07-28 03:11:41 +00:00
|
|
|
Date: Wed, 27 Jul 2022 22:09:00 -0500
|
2021-06-12 18:04:04 +00:00
|
|
|
Subject: [PATCH] Build changes
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
2023-03-16 03:57:35 +00:00
|
|
|
index 9cf389defdaeb887e9cad4f0fed3f3b95667b238..e92a7dd91f4b4771d8087a5fbeed225938da0ef8 100644
|
2021-06-12 18:04:04 +00:00
|
|
|
--- a/build.gradle.kts
|
|
|
|
+++ b/build.gradle.kts
|
2022-11-10 23:23:17 +00:00
|
|
|
@@ -7,8 +7,10 @@ plugins {
|
2021-06-12 18:04:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2022-04-19 23:21:18 +00:00
|
|
|
- implementation(project(":paper-api"))
|
|
|
|
- implementation(project(":paper-mojangapi"))
|
2022-04-22 05:15:08 +00:00
|
|
|
+ implementation(project(":Scissors-API"))
|
2023-03-16 03:08:04 +00:00
|
|
|
+ implementation("io.papermc.paper:paper-mojangapi:1.19.4-R0.1-SNAPSHOT") {
|
2022-08-09 03:51:43 +00:00
|
|
|
+ exclude("io.papermc.paper", "paper-api")
|
|
|
|
+ }
|
2021-06-12 18:04:04 +00:00
|
|
|
// Paper start
|
2021-11-04 02:59:43 +00:00
|
|
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
|
|
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
2023-02-16 07:49:51 +00:00
|
|
|
@@ -58,11 +60,17 @@ tasks.jar {
|
2022-04-22 08:04:10 +00:00
|
|
|
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
|
|
|
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
|
|
|
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
|
|
|
|
- val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
|
|
|
|
+ var gitBranch: String;
|
|
|
|
+ if (System.getenv("JENKINS_URL") == null)
|
|
|
|
+ {
|
|
|
|
+ gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
|
|
|
|
+ } else {
|
|
|
|
+ gitBranch = System.getenv("GITHUB_BRANCH")
|
|
|
|
+ }
|
2021-08-25 04:06:30 +00:00
|
|
|
attributes(
|
|
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
|
|
"Implementation-Title" to "CraftBukkit",
|
|
|
|
- "Implementation-Version" to "git-Paper-$implementationVersion",
|
2022-04-19 23:21:18 +00:00
|
|
|
+ "Implementation-Version" to "git-Scissors-$implementationVersion",
|
2021-08-25 04:06:30 +00:00
|
|
|
"Implementation-Vendor" to date, // Paper
|
|
|
|
"Specification-Title" to "Bukkit",
|
|
|
|
"Specification-Version" to project.version,
|
2023-02-16 07:49:51 +00:00
|
|
|
@@ -134,7 +142,7 @@ fun TaskContainer.registerRunTask(
|
2022-04-19 23:21:18 +00:00
|
|
|
name: String,
|
|
|
|
block: JavaExec.() -> Unit
|
2021-06-16 06:28:10 +00:00
|
|
|
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
|
|
|
- group = "paper"
|
|
|
|
+ group = "paperweight"
|
2022-04-19 23:21:18 +00:00
|
|
|
mainClass.set("org.bukkit.craftbukkit.Main")
|
2021-06-16 06:28:10 +00:00
|
|
|
standardInput = System.`in`
|
2022-04-19 23:21:18 +00:00
|
|
|
workingDir = rootProject.layout.projectDirectory
|
2021-06-12 18:04:04 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
2023-03-29 19:57:52 +00:00
|
|
|
index 9f15d9dbdfa74a0640b1a2b4ff695609d4758a4c..c048169628a53462baf2e418136459719b2ac709 100644
|
2021-06-12 18:04:04 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
2023-03-29 19:57:52 +00:00
|
|
|
@@ -1682,7 +1682,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
2021-06-12 18:04:04 +00:00
|
|
|
|
|
|
|
@DontObfuscate
|
|
|
|
public String getServerModName() {
|
2021-09-25 02:10:14 +00:00
|
|
|
- return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
2022-06-11 03:24:53 +00:00
|
|
|
+ return "Scissors"; // Scissors - Scissors > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
2021-06-12 18:04:04 +00:00
|
|
|
}
|
|
|
|
|
2021-08-25 04:06:30 +00:00
|
|
|
public SystemReport fillSystemReport(SystemReport details) {
|
2021-06-12 18:04:04 +00:00
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
2023-03-16 03:57:35 +00:00
|
|
|
index f9a9d2bb7b6d1bf4a0931438de4d8c7ee0757479..ccc578bf2d7edfe866a5892978ce9e116787c4b4 100644
|
2021-06-12 18:04:04 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
2023-03-16 03:57:35 +00:00
|
|
|
@@ -256,7 +256,7 @@ import javax.annotation.Nullable; // Paper
|
2021-06-12 18:04:04 +00:00
|
|
|
import javax.annotation.Nonnull; // Paper
|
|
|
|
|
|
|
|
public final class CraftServer implements Server {
|
|
|
|
- private final String serverName = "Paper"; // Paper
|
2022-07-28 03:11:41 +00:00
|
|
|
+ private final String serverName = "Scissors"; // Scissors > // Paper
|
2021-06-12 18:04:04 +00:00
|
|
|
private final String serverVersion;
|
|
|
|
private final String bukkitVersion = Versioning.getBukkitVersion();
|
|
|
|
private final Logger logger = Logger.getLogger("Minecraft");
|
2021-08-25 04:06:30 +00:00
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
2022-04-22 05:15:08 +00:00
|
|
|
index 774556a62eb240da42e84db4502e2ed43495be17..5e6cce78e7987b4aa1c0052262ab8c4563905372 100644
|
2021-08-25 04:06:30 +00:00
|
|
|
--- 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/io.papermc.paper/paper-api/pom.properties");
|
2022-04-22 05:15:08 +00:00
|
|
|
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/me.totalfreedom.scissors/Scissors-API/pom.properties");
|
2021-08-25 04:06:30 +00:00
|
|
|
Properties properties = new Properties();
|
|
|
|
|
|
|
|
if (stream != null) {
|