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

✨ Allow for more easily using translatable components with MinecraftHelp #197

Merged
merged 2 commits into from
Jan 4, 2021

Conversation

jpenilla
Copy link
Member

@jpenilla jpenilla commented Jan 3, 2021

These changes allow for more easily using adventure's translation system with MinecraftHelp.

final MinecraftHelp<CommandSender> help = new MinecraftHelp<>(
  "/example help",
  audiences::sender,
  commandManager
);

help.messageProvider((sender, key, args) ->
  Component.translatable(
    "example.help." + key,
    Arrays.stream(args).map(Component::text).collect(Collectors.toList())
  )
);

help.descriptionDecorator(Component::translatable);

@jpenilla jpenilla merged commit 2233390 into 1.4.0-dev Jan 4, 2021
@jpenilla jpenilla deleted the features/1.4.0/minecrafthelp-enhancements branch January 4, 2021 06:19
@Citymonstret Citymonstret added this to the 1.4.0 milestone Jan 12, 2021
Citymonstret pushed a commit that referenced this pull request Jan 14, 2021
…elp (#197)

* ✨ Allow for more easily using translatable components with MinecraftHelp

* Add missing Javadoc
Citymonstret pushed a commit that referenced this pull request Jan 16, 2021
…elp (#197)

* ✨ Allow for more easily using translatable components with MinecraftHelp

* Add missing Javadoc
broccolai pushed a commit to broccolai/cloud that referenced this pull request Mar 29, 2021
…elp (Incendo#197)

* ✨ Allow for more easily using translatable components with MinecraftHelp

* Add missing Javadoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants