Supports the ability for commands to be registered internally (#12520)

This commit is contained in:
Owen
2025-05-06 16:05:00 -04:00
committed by GitHub
parent c98cd65802
commit 42a2a6c2b5
12 changed files with 92 additions and 52 deletions

View File

@@ -172,7 +172,7 @@
}
return null;
@@ -359,26 +_,120 @@
@@ -359,26 +_,121 @@
}
public void sendCommands(ServerPlayer player) {
@@ -252,6 +252,7 @@
+ }
+ // Paper end - Brigadier API
+ if (!org.spigotmc.SpigotConfig.sendNamespaced && commandNode.getName().contains(":")) continue; // Spigot
+ if (commandNode.wrappedCached != null && commandNode.wrappedCached.apiCommandMeta != null && commandNode.wrappedCached.apiCommandMeta.serverSideOnly()) continue; // Paper
if (commandNode.canUse(source)) {
ArgumentBuilder<SharedSuggestionProvider, ?> argumentBuilder = (ArgumentBuilder) commandNode.createBuilder();
+ // Paper start