9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-03 14:22:26 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0004-Leaf-Commands.patch
2025-09-28 00:50:14 -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 26ebab18013d4587c2de5c62c14df486afae9f15..f36998b6d484afb900c399bd8b906977250c58d4 100644
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -278,6 +278,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