8000 Register commands as plugin commands on Paper 1.20.6 and above by DerEchtePilz · Pull Request #629 · CommandAPI/CommandAPI · GitHub
[go: up one dir, main page]

Skip to content

Register commands as plugin commands on Paper 1.20.6 and above #629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
So it doesn't actually work...
This fixes the issue described on discord where if a plugin registeres commands with the CommandAPI and Paper's Brigadier API, that the commands that were registered with the CommandAPI do
not appear in the plugin's help topic (/help PluginName) after running `minecraft:reload`.

This reverts commit 35ecee0.
  • Loading branch information
DerEchtePilz committed Feb 21, 2025
commit 956d0f699ef277b3383018726ff1135ebee7fbd3
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,12 @@ public CommandRegistrationStrategy<CommandSourceStack> createCommandRegistration
}
return new PaperCommandRegistration<>(
() -> this.<MinecraftServer>getMinecraftServer().getCommands().getDispatcher(),
() -> ((SimpleHelpMap) Bukkit.getServer().getHelpMap()).initializeCommands(),
() -> {
SimpleHelpMap helpMap = (SimpleHelpMap) Bukkit.getServer().getHelpMap();
helpMap.clear();
helpMap.initializeGeneralTopics();
helpMap.initializeCommands();
},
node -> bukkitCommandNode_bukkitBrigCommand.isInstance(node.getCommand())
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,12 @@ public CommandRegistrationStrategy<CommandSourceStack> createCommandRegistration
}
return new PaperCommandRegistration<>(
() -> this.<MinecraftServer>getMinecraftServer().getCommands().getDispatcher(),
() -> ((SimpleHelpMap) Bukkit.getServer().getHelpMap()).initializeCommands(),
() -> {
SimpleHelpMap helpMap = (SimpleHelpMap) Bukkit.getServer().getHelpMap();
helpMap.clear();
helpMap.initializeGeneralTopics();
helpMap.initializeCommands();
},
node -> bukkitCommandNode_bukkitBrigCommand.isInstance(node.getCommand())
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,12 @@ public CommandRegistrationStrategy<CommandSourceStack> createCommandRegistration
}
return new PaperCommandRegistration<>(
() -> this.<MinecraftServer>getMinecraftServer().getCommands().getDispatcher(),
() -> ((SimpleHelpMap) Bukkit.getServer().getHelpMap()).initializeCommands(),
() -> {
SimpleHelpMap helpMap = (SimpleHelpMap) Bukkit.getServer().getHelpMap();
helpMap.clear();
helpMap.initializeGeneralTopics();
helpMap.initializeCommands();
},
node -> bukkitCommandNode_bukkitBrigCommand.isInstance(node.getCommand())
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,12 @@ public CommandRegistrationStrategy<CommandSourceStack> createCommandRegistration
}
return new PaperCommandRegistration<>(
() -> this.<MinecraftServer>getMinecraftServer().getCommands().getDispatcher(),
() -> ((SimpleHelpMap) Bukkit.getServer().getHelpMap()).initializeCommands(),
() -> {
SimpleHelpMap helpMap = (SimpleHelpMap) Bukkit.getServer().getHelpMap();
helpMap.clear();
helpMap.initializeGeneralTopics();
helpMap.initializeCommands();
},
node -> bukkitCommandNode_bukkitBrigCommand.isInstance(node.getCommand())
);
}
Expand Down
Loading
0