Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
PlayerDeathEventListener: fix incorrect placeholder check <due_to>
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFaser committed Sep 3, 2023
1 parent e2e76d4 commit d0f468e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private String formatMessage(String message, Player player, PlayerDamager player
if (finalBlock != null) message = message
.replace("<block>", finalBlock.name());

if (killer != null) {
if (killer != null && finalEntity != null && !killer.getType().equals(finalEntity.getType())) {
String dueToMessage = locale.getFormatString("death.due-to", null);
message = message.replace("<due_to>", dueToMessage.replace("<killer>", killer.getName()));
}
Expand Down

0 comments on commit d0f468e

Please sign in to comment.