-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Is your feature request related to a problem?
Some developers expect to use the commands section in the paper-plugin.yml as they do in the plugin.yml. This is unsupported, which causes calls such as getCommand("myCommand").setExecutor(someExecutor) to fail with a NPE.
A NPE does not immediately explain the cause of the bug, namely that the developer expects to use the commands section but the commands section is no longer a feature. So the developer revisits the paper-plugin.yml, checks for typos, checks the code again, recompiles and reruns, and it still doesn't work. Then they maybe read the documentation on Paper plugins one more time, or join the PaperMC discord (as has happened recently) to debug.
Describe the solution you'd like.
If the commands section is found, print a warning message informing developers it is not available using paper-plugin.yml and programmatic registration is preferred.
It may be worth even throwing an exception and refusing to load the plugin. I can see no other reason to use the commands section if paper-plugin.yml is not in use.
Describe alternatives you've considered.
Do nothing, and continue to sustain inquiries and support requests on this.
The documentation is already sufficiently prominent, so I see nothing to change there.
Other
No response