Skip to content

Commit

Permalink
Merge branch '2.x' into fix-5716
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy committed Mar 25, 2024
2 parents e994399 + 8cfe680 commit 6c406e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ public void sendTl(final String tlKey, final Object... 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) {
Expand Down
3 changes: 3 additions & 0 deletions Essentials/src/main/java/com/earth2me/essentials/Console.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public void sendMessage(final String message) {
@Override
public void sendTl(String tlKey, Object... args) {
final String translation = tlLiteral(tlKey, args);
if (translation.isEmpty()) {
return;
}

final Audience consoleAudience = ((Essentials) ess).getBukkitAudience().sender(getCommandSender());
final Component component = AdventureUtil.miniMessage()
Expand Down

0 comments on commit 6c406e9

Please sign in to comment.