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

Make HelpInput use the known command map #3675

Merged
merged 4 commits into from
Oct 19, 2020

Conversation

Citymonstret
Copy link
Contributor

This PR makes HelpInput use knownCommands in the command map, rather than relying on plugin descriptions. This means that commands that have been registered programmatically (or impromptu) will be recognized and displayed in the help menu.

The ugly reflection is due to Spigot not exposing the command map getter. This has been tested on Spigot 1.8, 1.16.3 and Paper 1.16.3 with plugins that register commands directly to the command map.

JRoy
JRoy previously approved these changes Sep 15, 2020
Copy link
Member

@JRoy JRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reflection/provider/version check look correct + tested

@JRoy JRoy added the type: enhancement Features and feature requests. label Sep 15, 2020
@JRoy JRoy added this to the 2.18.2 milestone Sep 15, 2020
jpenilla
jpenilla previously approved these changes Sep 16, 2020
Copy link
Contributor

@jpenilla jpenilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this :) (tested and working with my plugins using ACF on 1.16.3 and 1.8.8)

@Citymonstret Citymonstret dismissed stale reviews from jpenilla and JRoy via 51f0429 September 16, 2020 02:25
jpenilla
jpenilla previously approved these changes Sep 16, 2020
Copy link
Contributor

@jpenilla jpenilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested working 👍

pop4959
pop4959 previously approved these changes Sep 16, 2020
@pop4959 pop4959 requested a review from mdcfe September 16, 2020 05:02
@mdcfe mdcfe added the status: needs manual rebase Needs a manual local rebase due to base changes (regardless of what GH says) label Oct 5, 2020
mdcfe
mdcfe previously approved these changes Oct 19, 2020
JRoy
JRoy previously approved these changes Oct 19, 2020
@mdcfe mdcfe dismissed stale reviews from JRoy, pop4959, jpenilla, and themself via d22f3cc October 19, 2020 13:31
mdcfe
mdcfe previously approved these changes Oct 19, 2020
JRoy
JRoy previously approved these changes Oct 19, 2020
@mdcfe mdcfe dismissed stale reviews from JRoy and themself via 4dfd0f1 October 19, 2020 13:37
@mdcfe mdcfe removed the status: needs manual rebase Needs a manual local rebase due to base changes (regardless of what GH says) label Oct 19, 2020
@mdcfe mdcfe changed the title Make HelpInput use the known command list rather than plugin descript… Make HelpInput use the known command map Oct 19, 2020
@mdcfe mdcfe merged commit a4f580e into EssentialsX:2.x Oct 19, 2020
Chew pushed a commit to Chew/Essentials that referenced this pull request Nov 25, 2020
Co-authored-by: MD <1917406+md678685@users.noreply.github.com>

This PR makes HelpInput use knownCommands in the command map, rather than relying on plugin descriptions. This means that commands that have been registered programmatically (or impromptu) will be recognized and displayed in the help menu.

The ugly reflection is due to Spigot not exposing the command map getter. This has been tested on Spigot 1.8, 1.16.3 and Paper 1.16.3 with plugins that register commands directly to the command map.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Features and feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants