9
0
mirror of https://github.com/SparklyPower/SparklyPaper.git synced 2025-12-19 15:09:27 +00:00
Files
SparklyPaperMC/patches/server/0001-new-fork-who-dis-Rebrand-to-SparklyPaper-and-Build-C.patch
2024-11-25 13:40:25 -03:00

103 lines
6.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MrPowerGamerBR <git@mrpowergamerbr.com>
Date: Sat, 12 Jun 2021 16:40:34 +0200
Subject: [PATCH] new fork who dis - Rebrand to SparklyPaper and Build Changes
diff --git a/build.gradle.kts b/build.gradle.kts
index faf3e3fd72e8c915e7a4803dacbe1bb576c6663e..144c7a15a51f0d22f3c35412fa7aa395d092bebc 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -3,6 +3,8 @@ import java.time.Instant
plugins {
java
+ kotlin("jvm") version "2.0.0"
+ kotlin("plugin.serialization") version "2.0.0"
`maven-publish`
}
@@ -25,7 +27,12 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider {
// Paper end - configure mockito agent that is needed in newer java versions
dependencies {
- implementation(project(":paper-api"))
+ // SparklyPaper start
+ implementation(project(":sparklypaper-api"))
+ implementation(kotlin("reflect"))
+ implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
+ implementation("com.charleskorn.kaml:kaml:0.55.0")
+ // SparklyPaper end
// Paper start
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
@@ -94,7 +101,12 @@ tasks.jar {
val mcVersion = rootProject.providers.gradleProperty("mcVersion").get()
val build = System.getenv("BUILD_NUMBER") ?: null
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
- val implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash"
+ // SparklyPaper start
+ var implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash"
+ if (project.hasProperty("sparklypaperImplementationVersionSuffix")) {
+ implementationVersion += "/${project.property("sparklypaperImplementationVersionSuffix")}"
+ }
+ // SparklyPaper end
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper
attributes(
@@ -105,8 +117,8 @@ tasks.jar {
"Specification-Title" to "Paper",
"Specification-Version" to project.version,
"Specification-Vendor" to "Paper Team",
- "Brand-Id" to "papermc:paper",
- "Brand-Name" to "Paper",
+ "Brand-Id" to "sparklypower:sparklypaper", // SparklyPaper
+ "Brand-Name" to "SparklyPaper", // SparklyPaper
"Build-Number" to (build ?: ""),
"Build-Time" to Instant.now().toString(),
"Git-Branch" to gitBranch, // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 774556a62eb240da42e84db4502e2ed43495be17..9bc7b99b5b39a8ffe4118b8d86f5b8065c4fe460 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/net.sparklypower.sparklypaper/sparklypaper-api/pom.properties"); // SparklyPaper
Properties properties = new Properties();
if (stream != null) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index f7a4fee9bb25ff256dc2e5ea26bfbceca6a49167..e7321e56c6ba3c601641c6466857331e9fe5f4bb 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -155,14 +155,14 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
if (isLongTimeout) {
// Paper end
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Paper bug." ); // Paper
+ log.log( Level.SEVERE, "The server has stopped responding! This is (probably) not a Paper bug. This could be a SparklyPaper bug and, in that case, MrPowerGamerBR probably made a fucky wucky!" ); // SparklyPaper - branding changes // Paper
log.log( Level.SEVERE, "If you see a plugin in the Server thread dump below, then please report it to that author" );
log.log( Level.SEVERE, "\t *Especially* if it looks like HTTP or MySQL operations are occurring" );
log.log( Level.SEVERE, "If you see a world save or edit, then it means you did far more than your server can handle at once" );
log.log( Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes" );
- log.log( Level.SEVERE, "If you are unsure or still think this is a Paper bug, please report this to https://github.com/PaperMC/Paper/issues" );
+ log.log( Level.SEVERE, "If you are unsure or still think this is a SparklyPaper bug, please report this to https://github.com/SparklyPower/SparklyPaper/issues - and if you think this is a Paper bug, please report this to https://github.com/PaperMC/Paper/issues" );
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
- log.log( Level.SEVERE, "Paper version: " + Bukkit.getServer().getVersion() );
+ log.log( Level.SEVERE, "SparklyPaper version: " + Bukkit.getServer().getVersion() ); // SparklyPaper - branding changes
//
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
{
@@ -189,7 +189,7 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
}
// Paper end - Different message for short timeout
log.log( Level.SEVERE, "------------------------------" );
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to SparklyPaper!):" ); // SparklyPaper - branding changes // Paper
ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkTaskScheduler.dumpAllChunkLoadInfo(MinecraftServer.getServer(), isLongTimeout); // Paper - rewrite chunk system
this.dumpTickingInfo(); // Paper - log detailed tick information
WatchdogThread.dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );