Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a broadcast function for translations. #21

Open
SIsilicon opened this issue Oct 3, 2021 · 1 comment
Open

Add a broadcast function for translations. #21

SIsilicon opened this issue Oct 3, 2021 · 1 comment

Comments

@SIsilicon
Copy link

The proposal is simple; create a broadcast function that instead accepts a translation key as an argument, as well as a list of text to substitute within the translation.
This could be implemented using the tellraw command. And could also be extended to errors in custom commands when one is thrown.

@jrcarl624
Copy link
Contributor

The custom commands error already uses this for errors...

            if (!getCommand) {
                data.cancel = true;
                return this.runCommand(
                    `tellraw "${data.sender.nameTag}" {"rawtext":[{"text":"§c"},{"translate":"commands.generic.unknown", "with": ["§f${command}§c"]}]}`

^^^^ found in /src/libraries/Minecraft.js

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants