Skip to content
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

Scrap plugin.yml commands #6506

Open
dktapps opened this issue Nov 15, 2024 · 0 comments
Open

Scrap plugin.yml commands #6506

dktapps opened this issue Nov 15, 2024 · 0 comments
Labels
BC break Breaks API compatibility Category: API Related to the plugin API Easy task Probably really easy to do, good task for first-time contributors Opinions Wanted Request for comments & opinions from the community Type: Cleanup Removes or deprecates API methods or behaviour
Milestone

Comments

@dktapps
Copy link
Member

dktapps commented Nov 15, 2024

Description

It's 2024 and most people just declare them in code anyway.

More seriously, command handlers are like event handlers, and the system we create them by should reflect that. It doesn't make much sense to separate the base info from the implementation the way we do right now, and no one likes being bound to onCommand (see #5960).

In addition, it's currently impractical to do stuff like using localized descriptions, and plugin.yml commands also aren't suited to a future where the command parser actually processes arguments into proper types instead of just passing string[] $args to everything.

The only real downside to scrapping these commands is that it won't be possible to tell what commands a plugin has without running the server and doing /help. However, since many people already don't use plugin.yml for commands, this is kinda a moot point.

We can reduce the friction of creating commands procedurally by implementing changes like #6063.

In the future, we could also implement a system using @doccomments and a magic interface like Listener for registering command handlers if there's a demand for it.

Justification

The whole thing is misconceived. I wrote about this at length in #5960.

This has been discussed for years and years, and I'm frankly amazed that a formal change proposal has never been submitted before.

@dktapps dktapps added Category: API Related to the plugin API BC break Breaks API compatibility Type: Cleanup Removes or deprecates API methods or behaviour Opinions Wanted Request for comments & opinions from the community labels Nov 15, 2024
@dktapps dktapps moved this to Todo in Commands rework Nov 15, 2024
@dktapps dktapps added this to the 6.0 milestone Nov 16, 2024
@dktapps dktapps added the Easy task Probably really easy to do, good task for first-time contributors label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC break Breaks API compatibility Category: API Related to the plugin API Easy task Probably really easy to do, good task for first-time contributors Opinions Wanted Request for comments & opinions from the community Type: Cleanup Removes or deprecates API methods or behaviour
Projects
Status: Todo
Development

No branches or pull requests

1 participant