-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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