mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Bring back server name
This commit is contained in:
committed by
granny
parent
fb0d9a1cd6
commit
30fc669d6f
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
||||
@@ -49,6 +_,7 @@
|
||||
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 - Bring back server name
|
||||
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");
|
||||
@@ -24,11 +24,10 @@
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -3048,6 +_,18 @@
|
||||
{
|
||||
@@ -3049,6 +_,18 @@
|
||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||
}
|
||||
+
|
||||
|
||||
+ // Purpur start - Purpur config files
|
||||
+ @Override
|
||||
+ public YamlConfiguration getPurpurConfig() {
|
||||
@@ -40,6 +39,19 @@
|
||||
+ return getProperties().properties;
|
||||
+ }
|
||||
+ // Purpur end - Purpur config files
|
||||
|
||||
+
|
||||
@Override
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
@@ -3288,4 +_,11 @@
|
||||
this.console.addPluginAllowingSleep(plugin.getName(), value);
|
||||
}
|
||||
// Paper end - API to check if the server is sleeping
|
||||
+
|
||||
+ // Purpur start - Bring back server name
|
||||
+ @Override
|
||||
+ public String getServerName() {
|
||||
+ return this.getProperties().serverName;
|
||||
+ }
|
||||
+ // Purpur end - Bring back server name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user