Purpur/patches/server/0014-Configurable-server-mod-name.patch
granny 028d47bf9f
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@990be16 Iterate over entity array copy for entity scheduler
PaperMC/Paper@3f6c4b0 Add event for player editing sign (#9300)
PaperMC/Paper@7103f81 Only tick item frames if players can see it (#9377)
PaperMC/Paper@cf0f013 Avoid duplicate death event call for armorstands (#9223)
PaperMC/Paper@8582999 Deprecate duplicate chat completion methods (#9401)
PaperMC/Paper@e4b40dd Fix entity selectors while spectating (#9402)
PaperMC/Paper@82cd69f [ci skip] Update Repo style and change project url in README (#9407)
PaperMC/Paper@2c9c5e4 Fix replenishable container entities save/load existing contents (#9417)
PaperMC/Paper@437e8da Improve command function perm level checks (#9411)
PaperMC/Paper@225c950 Hotfix double entity removal making entity scheduler retire call
PaperMC/Paper@fead63e Add option to disable NoteBlock and Tripwire updates (#9368)

Pufferfish Changes:
pufferfish-gg/Pufferfish@50f3124 Updated Upstream (Paper)
pufferfish-gg/Pufferfish@5673490 Add option to suppress null ID disconnections in logs
pufferfish-gg/Pufferfish@1e911fb Fix issue with that last patch
2023-06-30 12:37:27 -07:00

36 lines
2.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 21 Mar 2020 11:47:39 -0500
Subject: [PATCH] Configurable server mod name
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index da825e7667032cb656585367bf4b96bc18f57aa6..80c085498d9b61bae2e06df873c1ad66cc7d8ae5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1696,7 +1696,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
- return "Purpur"; // Purpur - Purpur > // Pufferfish - Pufferfish > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
+ return org.purpurmc.purpur.PurpurConfig.serverModName; // Purpur - Purpur > // Pufferfish - Pufferfish > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
}
public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
index 6b768cff1318b4bcebeed95345f3cfdce05a2c16..3d72f71c851e2d46e9cbeab9cdbadc532cb90eb2 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
@@ -188,6 +188,11 @@ public class PurpurConfig {
afkTabListSuffix = MiniMessage.miniMessage().serialize(MiniMessage.miniMessage().deserialize(getString("settings.messages.afk-tab-list-suffix", afkTabListSuffix)));
}
+ public static String serverModName = "Purpur";
+ private static void serverModName() {
+ serverModName = getString("settings.server-mod-name", serverModName);
+ }
+
public static int barrelRows = 3;
public static boolean enderChestSixRows = false;
public static boolean enderChestPermissionRows = false;