-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Better help and usage #562
Comments
For help available in the |
Thanks for the quick response. A little problem with this method is that it takes up some space, that's why i made this too. Please take this idea into consideration because it's much simpler than the |
There are actually some API methods like your suggestions currently in development on the Using Bukkit’s help API, it is not possible to change the short description based on the This issue is also related #470. The same commit on I’m reopening this issues for tracking for |
Description
A command may have branches that only operators can access or it may only be executed by a player which may lead to some confusion if the help and usage is the same for everyone.
My solution for that is a different help and usage message for different command executors and a help supplier. For example an ender chest command may open other players' ender chests if the executor is an operator but normally it would only open the executor's ender chest, or a command that can only be executed by a player may have a help message that indicates exactly that but if a player runs the help command it would display another help message.
The generic help messages and methods that everyone sees would stay the same but you could "override" them with some new methods. For example
.withFullDescriptionPlayerSupplier(Function<Player, String>)
or.withHelpPlayerSupplier(Function<Player, Pair<String, String>>)
or.withHelpPlayerSupplier(Function<Player, HelpTopic>)
and so on...The usage message could get some new methods too:
.addUsage(String... usage)
or.addUsageSupplier(Supplier<String[]>)
or.addUsageCollectionSupplier(Supplier<Collection<String>>)
or.addUsagePlayerSupplier(Function<Player, String[]>)
and so on...There would be lots of help methods but I think it's worth it in the end.
Expected code
Extra details
No response
The text was updated successfully, but these errors were encountered: