Files
Purpur/purpur-server/minecraft-patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch
William Blake Galbreath 42bf7db018 Implement TPSBar
2025-01-14 11:51:16 -08:00

27 lines
1.2 KiB
Diff

--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -224,6 +_,15 @@
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
+ // Purpur start - Purpur config files
+ try {
+ org.purpurmc.purpur.PurpurConfig.init((java.io.File) options.valueOf("purpur-settings"));
+ } catch (Exception e) {
+ DedicatedServer.LOGGER.error("Unable to load server configuration", e);
+ return false;
+ }
+ org.purpurmc.purpur.PurpurConfig.registerCommands();
+ // Purpur end - Purpur config files
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
this.setPvpAllowed(properties.pvp);
@@ -350,6 +_,7 @@
LOGGER.info("JMX monitoring enabled");
}
+ org.purpurmc.purpur.task.BossBarTask.startAll(); // Purpur - Implement TPSBar
return true;
}
}