mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-01 04:37:09 +00:00
92 lines
4.7 KiB
Diff
92 lines
4.7 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Telesphoreo <me@telesphoreo.me>
|
|
Date: Wed, 27 Jul 2022 22:09:00 -0500
|
|
Subject: [PATCH] Build changes
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
index 6a1853f3d988820f357c11371e32d50682e60401..fb72feb5878ae07c76754ab0e213f9797fcd88c2 100644
|
|
--- a/build.gradle.kts
|
|
+++ b/build.gradle.kts
|
|
@@ -7,8 +7,10 @@ plugins {
|
|
}
|
|
|
|
dependencies {
|
|
- implementation(project(":paper-api"))
|
|
- implementation(project(":paper-mojangapi"))
|
|
+ implementation(project(":Scissors-API"))
|
|
+ implementation("io.papermc.paper:paper-mojangapi:1.19.3-R0.1-SNAPSHOT") {
|
|
+ exclude("io.papermc.paper", "paper-api")
|
|
+ }
|
|
// Paper start
|
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
|
@@ -58,11 +60,17 @@ tasks.jar {
|
|
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")
|
|
+ }
|
|
attributes(
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
"Implementation-Title" to "CraftBukkit",
|
|
- "Implementation-Version" to "git-Paper-$implementationVersion",
|
|
+ "Implementation-Version" to "git-Scissors-$implementationVersion",
|
|
"Implementation-Vendor" to date, // Paper
|
|
"Specification-Title" to "Bukkit",
|
|
"Specification-Version" to project.version,
|
|
@@ -134,7 +142,7 @@ fun TaskContainer.registerRunTask(
|
|
name: String,
|
|
block: JavaExec.() -> Unit
|
|
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
|
- group = "paper"
|
|
+ group = "paperweight"
|
|
mainClass.set("org.bukkit.craftbukkit.Main")
|
|
standardInput = System.`in`
|
|
workingDir = rootProject.layout.projectDirectory
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 710ca7d3a5659953f64bc6dccdd93b43300961cc..ad9cd0987098c8969fdf002969188458b0398924 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1654,7 +1654,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@DontObfuscate
|
|
public String getServerModName() {
|
|
- return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
|
+ return "Scissors"; // Scissors - Scissors > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
|
}
|
|
|
|
public SystemReport fillSystemReport(SystemReport details) {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index f938095d999412d88fa3fcf76b87253034124cb9..83fa0d27e72261fe7bcec2ae58a61f431963b36e 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -261,7 +261,7 @@ import javax.annotation.Nullable; // Paper
|
|
import javax.annotation.Nonnull; // Paper
|
|
|
|
public final class CraftServer implements Server {
|
|
- private final String serverName = "Paper"; // Paper
|
|
+ private final String serverName = "Scissors"; // Scissors > // 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 774556a62eb240da42e84db4502e2ed43495be17..5e6cce78e7987b4aa1c0052262ab8c4563905372 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/io.papermc.paper/paper-api/pom.properties");
|
|
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/me.totalfreedom.scissors/Scissors-API/pom.properties");
|
|
Properties properties = new Properties();
|
|
|
|
if (stream != null) {
|