Skip to content

Commit

Permalink
Fix sending the wrong message to the sender
Browse files Browse the repository at this point in the history
  • Loading branch information
DevCyntrix committed Dec 19, 2023
1 parent 8f0a476 commit 2946942
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ protected void execute(CommandSender sender, Player player) {
player.setRemainingAir(player.getMaximumAir());
player.setFreezeTicks(0);

plugin.bundle().sendMessage(sender, "health.restored.self");
if (player != sender) plugin.bundle().sendMessage(sender, "health.restored.others",
Placeholder.component("player", player.name()));
if (player == sender)
plugin.bundle().sendMessage(sender, "health.restored.self");
if (player != sender) {
plugin.bundle().sendMessage(sender, "health.restored.others",
Placeholder.component("player", player.name()));
plugin.bundle().sendMessage(player, "health.restored.self");
}
}

@Override
Expand Down

0 comments on commit 2946942

Please sign in to comment.