JorelAli / CommandAPI

A Bukkit/Spigot API for the command UI introduced in Minecraft 1.13
https://commandapi.jorel.dev
MIT License
526 stars 67 forks source link

Allow per-player i18n for command help #528

Closed XHawk87 closed 5 months ago

XHawk87 commented 6 months ago

Description

I'd like to be able to supply help messages to users for commands in the user's preferred language.

Expected code

new CommandAPICommand("blah")
  .withHelp(makeHelpTopic("blah"))
  .executes( ... )
  .register();
public HelpTopic makeHelpTopic(String commandName) {
  return new HelpTopic() {
    @Override
    public String getFullText(@NotNull CommandSender forWho) {
      // Something something i18n
    }
  }
}

This would be an alternative to .withHelp(String shortDescription, String fullDescription)

Extra details

No response

JorelAli commented 5 months ago

Implemented for 9.4.0

JorelAli commented 5 months ago

Implemented in version 9.4.0.