Register commands as plugin commands on Paper 1.20.6 and above#629
Merged
DerEchtePilz merged 14 commits intodev/devfrom Feb 27, 2025
Merged
Register commands as plugin commands on Paper 1.20.6 and above#629DerEchtePilz merged 14 commits intodev/devfrom
DerEchtePilz merged 14 commits intodev/devfrom
Conversation
This was
linked to
issues
Jan 4, 2025
6b1184a to
dde4b8e
Compare
dde4b8e to
612e226
Compare
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.
f2fd1e7 to
e58b0e1
Compare
willkroboth
requested changes
Feb 26, 2025
Collaborator
willkroboth
left a comment
There was a problem hiding this comment.
Just static code analysis right now, haven't re-tested the changes made since I last tried this.
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Outdated
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Outdated
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Outdated
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Outdated
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Outdated
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Outdated
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Show resolved
Hide resolved
willkroboth
reviewed
Feb 26, 2025
Collaborator
willkroboth
left a comment
There was a problem hiding this comment.
Redid the tests I mentioned on Discord and everything seems to be working well. Just a few optional comments, but functionality-wise seems good to merge.
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Outdated
Show resolved
Hide resolved
...kkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/PaperCommandRegistration.java
Show resolved
Hide resolved
...ndapi-bukkit/commandapi-bukkit-core/src/main/java/dev/jorel/commandapi/CommandAPIBukkit.java
Show resolved
Hide resolved
willkroboth
approved these changes
Feb 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #583
Fixes #578
The behaviour for #578 is unexpected, but corect. After this PR, instead of returning the wrong permission,
getCommandMap("commandname").getPermission()will returnnull. This is the correct behaviour which can easily be verified if you follow the initialization chain starting here: https://github.com/PaperMC/Paper/blob/09f1f88f58a03f61092f8636ad780d42db87d8d9/paper-server/src/main/java/io/papermc/paper/command/brigadier/PaperBrigadier.java#L49