Merge branch '2.x' into fix-5716

This commit is contained in:
Josh Roy 2024-03-25 15:09:22 -04:00 committed by GitHub
commit 6c406e9faa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -36,7 +36,9 @@ public class CommandSource {
} }
final String translation = tlLiteral(tlKey, args); final String translation = tlLiteral(tlKey, args);
sendComponent(AdventureUtil.miniMessage().deserialize(translation)); if (!translation.isEmpty()) {
sendComponent(AdventureUtil.miniMessage().deserialize(translation));
}
} }
public String tl(final String tlKey, final Object... args) { public String tl(final String tlKey, final Object... args) {

View File

@ -69,6 +69,9 @@ public final class Console implements IMessageRecipient {
@Override @Override
public void sendTl(String tlKey, Object... args) { public void sendTl(String tlKey, Object... args) {
final String translation = tlLiteral(tlKey, args); final String translation = tlLiteral(tlKey, args);
if (translation.isEmpty()) {
return;
}
final Audience consoleAudience = ((Essentials) ess).getBukkitAudience().sender(getCommandSender()); final Audience consoleAudience = ((Essentials) ess).getBukkitAudience().sender(getCommandSender());
final Component component = AdventureUtil.miniMessage() final Component component = AdventureUtil.miniMessage()