From 4f1f10333f6f4b4e61b34eaa9fcaff1040178255 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Wed, 18 Mar 2015 16:09:01 -0400 Subject: [PATCH] Use notification settings for critical hits Fixes #2498 --- .../com/gmail/nossr50/skills/axes/AxesManager.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java b/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java index 3421d5c55..4733253e0 100644 --- a/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java +++ b/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java @@ -74,10 +74,16 @@ public class AxesManager extends SkillManager { Player player = getPlayer(); - player.sendMessage(LocaleLoader.getString("Axes.Combat.CriticalHit")); + if (mcMMOPlayer.useChatNotifications()) { + player.sendMessage(LocaleLoader.getString("Axes.Combat.CriticalHit")); + } if (target instanceof Player) { - ((Player) target).sendMessage(LocaleLoader.getString("Axes.Combat.CritStruck")); + Player defender = (Player) target; + + if (UserManager.getPlayer(defender).useChatNotifications()) { + defender.sendMessage(LocaleLoader.getString("Axes.Combat.CritStruck")); + } damage = (damage * Axes.criticalHitPVPModifier) - damage; }