9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0004-Leaf-Commands.patch
2025-03-28 05:02:44 -04:00

32 lines
1.9 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Mon, 4 Nov 2024 23:07:27 -0500
Subject: [PATCH] Leaf Commands
Currently the config reload is just a simple poc,
if necessary, I will add @DoNotLoad feature in the future, like Luminol
TODOs:
Leaf status command
Leaf config command
Leaf version command enhanced (ability to show the list of new commits based on current version) (optional)
Leaf config
Leaf config only get config value (TODO: check whether work, and whether need to set config value back to keep the key in the config file)
Leaf config convert from toml to yaml
Leaf config v3 move to new key
...
diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java
index c697b3adeabd4f913e9e5e0b90c620a2a642f35d..c2ed1b0b67e62434292ebf3edd70c74af0c0d9af 100644
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -185,6 +185,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
thread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
+ org.dreeam.leaf.command.LeafCommands.registerCommands(this); // Leaf - Leaf commands
this.server.spark.registerCommandBeforePlugins(this.server); // Paper - spark
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now