mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@681c013 Bundle spark (#11093) PaperMC/Paper@5fee9c6 Move configuration option to a system property PaperMC/Paper@aa3b356 Improve server startup logging (#11110) PaperMC/Paper@9aea240 Properly lookup plugin classes when looked up by spark PaperMC/Paper@7e91a2c Update the bundled spark version Gale Changes: Dreeam-qwq/Gale@a4ed885 Updated Upstream (Paper) Dreeam-qwq/Gale@3932464 [ci skip] Remove TODOs Purpur Changes: PurpurMC/Purpur@936c29a Updated Upstream (Paper) PurpurMC/Purpur@032697e Updated Upstream (Paper) PurpurMC/Purpur@b2d1fea always output bukkit/paper plugin header in plugin command
46 lines
2.0 KiB
Diff
46 lines
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Mon, 17 Jul 2023 08:31:51 +0800
|
|
Subject: [PATCH] Purpur: Configurable server mod name
|
|
|
|
Original license: MIT
|
|
Original project: https://github.com/PurpurMC/Purpur
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 3c4e693ed09e7ccc5f94873a2c91e567be72b758..88edabf6f9b95812da88e3961de7884055429570 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1937,7 +1937,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@DontObfuscate
|
|
public String getServerModName() {
|
|
- return io.papermc.paper.ServerBuildInfo.buildInfo().brandName(); // Paper
|
|
+ return org.dreeam.leaf.config.modules.misc.ServerBrand.serverModName; // Paper // Leaf - Configurable server mod name
|
|
}
|
|
|
|
public SystemReport fillSystemReport(SystemReport details) {
|
|
diff --git a/src/main/java/org/dreeam/leaf/config/modules/misc/ServerBrand.java b/src/main/java/org/dreeam/leaf/config/modules/misc/ServerBrand.java
|
|
new file mode 100644
|
|
index 0000000000000000000000000000000000000000..15457b1928be0d8f1e1c0f1f1ef62dea54396a05
|
|
--- /dev/null
|
|
+++ b/src/main/java/org/dreeam/leaf/config/modules/misc/ServerBrand.java
|
|
@@ -0,0 +1,18 @@
|
|
+package org.dreeam.leaf.config.modules.misc;
|
|
+
|
|
+import org.dreeam.leaf.config.ConfigModules;
|
|
+import org.dreeam.leaf.config.EnumConfigCategory;
|
|
+
|
|
+public class ServerBrand extends ConfigModules {
|
|
+
|
|
+ public String getBasePath() {
|
|
+ return EnumConfigCategory.MISC.getBaseKeyName() + ".rebrand";
|
|
+ }
|
|
+
|
|
+ public static String serverModName = io.papermc.paper.ServerBuildInfo.buildInfo().brandName();
|
|
+
|
|
+ @Override
|
|
+ public void onLoaded() {
|
|
+ serverModName = config.getString(getBasePath() + ".server-mod-name", serverModName);
|
|
+ }
|
|
+}
|