From 9ba483bdf253071520b27cec2b4065b733733151 Mon Sep 17 00:00:00 2001 From: Jason H <51760372+JasonHorkles@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:54:33 -0600 Subject: [PATCH] Don't send death message if money lost was $0 --- src/main/java/me/jasonhorkles/expensivedeaths/DeathEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/jasonhorkles/expensivedeaths/DeathEvent.java b/src/main/java/me/jasonhorkles/expensivedeaths/DeathEvent.java index 4106bf2..ffa8f8e 100644 --- a/src/main/java/me/jasonhorkles/expensivedeaths/DeathEvent.java +++ b/src/main/java/me/jasonhorkles/expensivedeaths/DeathEvent.java @@ -65,7 +65,7 @@ else if (option.contains("%")) if (option.contains("-")) { final String money = String.valueOf(format.format(result.amount)); final String balance = String.valueOf(format.format(result.balance)); if (!plugin.getConfig().getString("death-message").isBlank()) - player.sendMessage(ChatColor.translateAlternateColorCodes( + if (!money.equals("0.00")) player.sendMessage(ChatColor.translateAlternateColorCodes( '&', plugin.getConfig().getString("death-message").replace("{MONEY}", money) .replace("{BALANCE}", balance)));