diff --git a/leaf-server/minecraft-patches/features/0193-Paper-Relocate-CommandMap-registerServerAliases-call.patch b/leaf-server/minecraft-patches/features/0193-Paper-Relocate-CommandMap-registerServerAliases-call.patch new file mode 100644 index 00000000..e614bbeb --- /dev/null +++ b/leaf-server/minecraft-patches/features/0193-Paper-Relocate-CommandMap-registerServerAliases-call.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Strokkur424 +Date: Tue, 17 Jun 2025 19:30:35 +0200 +Subject: [PATCH] Paper: Relocate CommandMap#registerServerAliases() call + +Original license: GPLv3 +Original project: https://github.com/PaperMC/Paper +Paper pull request: https://github.com/PaperMC/Paper/pull/12601 + +Fixed Paper#12600. + +This PR relocates the CommandMap#registerServerAliases() call to be after the lifecycle events for COMMANDS has been +run to accommodate for commands registered during a plugin's onEnable method. + +diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java +index 0baa48054beead8f187b56ea8d71916600ccea9f..c6f21d508636cbb3e6e8e88ecc280a6872074103 100644 +--- a/net/minecraft/server/MinecraftServer.java ++++ b/net/minecraft/server/MinecraftServer.java +@@ -749,6 +749,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop +Date: Tue, 17 Jun 2025 19:30:35 +0200 +Subject: [PATCH] Paper: Relocate CommandMap#registerServerAliases() call + +Original license: GPLv3 +Original project: https://github.com/PaperMC/Paper +Paper pull request: https://github.com/PaperMC/Paper/pull/12601 + +Fixed Paper#12600. + +This PR relocates the CommandMap#registerServerAliases() call to be after the lifecycle events for COMMANDS has been +run to accommodate for commands registered during a plugin's onEnable method. + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +index dd38057071de1ecce2e420bd0696a134190a09c1..77e5fc9e2625e2e31f12ff46c80ca55d39d6fe33 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +@@ -632,7 +632,6 @@ public final class CraftServer implements Server { + this.commandMap.setFallbackCommands(); + this.setVanillaCommands(false); + // Spigot end +- this.commandMap.registerServerAliases(); + DefaultPermissions.registerCorePermissions(); + CraftDefaultPermissions.registerCorePermissions(); + if (!io.papermc.paper.configuration.GlobalConfiguration.get().misc.loadPermissionsYmlBeforePlugins) this.loadCustomPermissions(); // Paper