mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-21 16:09:19 +00:00
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@be61a07 Updated Upstream (Paper) PurpurMC/Purpur@f154903 Updated Upstream (Paper) PurpurMC/Purpur@0fa9a50 Updated Upstream (Paper) PurpurMC/Purpur@d7a7c91 Updated Upstream (Paper) PurpurMC/Purpur@20fa61e Updated Upstream (Paper) PurpurMC/Purpur@501e7c5 Updated Upstream (Paper) PurpurMC/Purpur@2a50638 Updated Upstream (Paper) PurpurMC/Purpur@639bcbd Updated Upstream (Paper) PurpurMC/Purpur@bcf8103 remove obsolete allowUnsafeEnchants config option PurpurMC/Purpur@51f15ee fully remove obsolete allowUnsafeEnchants config option PurpurMC/Purpur@3d0716d Fix colored shulker box contents not dropping when destroyed, supercedes #1594 PurpurMC/Purpur@12e2926 [ci skip] drop old migration patch PurpurMC/Purpur@212c942 delegate itemstack convenience methods PurpurMC/Purpur@2eaea6a switch to JSpecify annotations
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 d9c654a16066857979623a54c6108c36faf91173..bfe6d88ec4181b093281e3371b41dcee039dff4e 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1945,7 +1945,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);
|
|
+ }
|
|
+}
|