From f00711475311073e58eb182b0cbe2d97bf0c5962 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 13 Jan 2019 22:42:55 -0800 Subject: [PATCH] Swords now use the ActionBar --- .../com/gmail/nossr50/skills/swords/SwordsManager.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java b/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java index 01681bd0e..74398cbc3 100644 --- a/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java +++ b/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java @@ -2,9 +2,11 @@ package com.gmail.nossr50.skills.swords; import java.util.Map; +import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; +import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.skills.SkillActivationType; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; @@ -59,14 +61,14 @@ public class SwordsManager extends SkillManager { } if (mcMMOPlayer.useChatNotifications()) { - getPlayer().sendMessage(LocaleLoader.getString("Swords.Combat.Bleeding")); + NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding"); } if (target instanceof Player) { Player defender = (Player) target; if (UserManager.getPlayer(defender).useChatNotifications()) { - defender.sendMessage(LocaleLoader.getString("Swords.Combat.Bleeding.Started")); + NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Started"); } } } @@ -86,10 +88,10 @@ public class SwordsManager extends SkillManager { if (SkillUtils.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.SWORDS_COUNTER_ATTACK, getPlayer(), this.skill, getSkillLevel(), activationChance)) { CombatUtils.dealDamage(attacker, damage / Swords.counterAttackModifier, getPlayer()); - getPlayer().sendMessage(LocaleLoader.getString("Swords.Combat.Countered")); + NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Countered"); if (attacker instanceof Player) { - ((Player) attacker).sendMessage(LocaleLoader.getString("Swords.Combat.Counter.Hit")); + NotificationManager.sendPlayerInformation((Player)attacker, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Counter.Hit"); } } }