mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@5b53cb4 [ci skip] use more jspecify in server PaperMC/Paper@a63013c [ci skip] fix compile issues caused by 5b53cb4 (#11664) PaperMC/Paper@cd9e697 Bump dawidd6/action-download-artifact from 3 to 6 in /.github/workflows (#11666) PaperMC/Paper@280b497 Change MinecraftServer#pluginsBlockingSleep to be Set PaperMC/Paper@4190ee7 Add Server#isGlobalTickThread PaperMC/Paper@5f0932b [ci skip] leaf
35 lines
1.9 KiB
Diff
35 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
Date: Sun, 26 May 2019 15:19:14 -0500
|
|
Subject: [PATCH] Bring back server name
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
|
index c3ec370b83b895be0f03662e3884fa4a2442a2a6..05e16103af3fd276f0196ddf1a2e5b729b025c34 100644
|
|
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
|
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
|
@@ -56,6 +56,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
|
|
public final boolean onlineMode = this.get("online-mode", true);
|
|
public final boolean preventProxyConnections = this.get("prevent-proxy-connections", false);
|
|
public final String serverIp = this.get("server-ip", "");
|
|
+ public final String serverName = this.get("server-name", "Unknown Server"); // Purpur
|
|
public final boolean pvp = this.get("pvp", true);
|
|
public final boolean allowFlight = this.get("allow-flight", false);
|
|
public final String motd = this.get("motd", "A Minecraft Server");
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 48a8bdd45c063797144e98e76f6007ae9025124e..96f0ff6877e2959fe1ab26728ee64b9c9b777d26 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -3285,4 +3285,11 @@ public final class CraftServer implements Server {
|
|
this.console.addPluginAllowingSleep(plugin.getName(), value);
|
|
}
|
|
// Paper end - API to check if the server is sleeping
|
|
+
|
|
+ // Purpur start
|
|
+ @Override
|
|
+ public String getServerName() {
|
|
+ return this.getProperties().serverName;
|
|
+ }
|
|
+ // Purpur end
|
|
}
|