From ba5428ff12d22ccd926ffef35cd853e5a9496649 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Sun, 13 Jan 2019 22:21:16 -0800 Subject: [PATCH] Adding more combat messages to Action Bar --- .../com/gmail/nossr50/runnables/skills/BleedTimerTask.java | 4 +++- .../java/com/gmail/nossr50/util/skills/CombatUtils.java | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/BleedTimerTask.java b/src/main/java/com/gmail/nossr50/runnables/skills/BleedTimerTask.java index b87d89ae7..64f4c2914 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/BleedTimerTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/BleedTimerTask.java @@ -5,6 +5,8 @@ import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; +import com.gmail.nossr50.datatypes.interactions.NotificationType; +import com.gmail.nossr50.util.player.NotificationManager; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; @@ -48,7 +50,7 @@ public class BleedTimerTask extends BukkitRunnable { entry.setValue(entry.getValue() - 1); if (entry.getValue() <= 0) { - player.sendMessage(LocaleLoader.getString("Swords.Combat.Bleeding.Stopped")); + NotificationManager.sendPlayerInformation(player, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.Bleeding.Stopped"); } } else { diff --git a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java index 75d2057ef..e00981580 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java @@ -4,7 +4,9 @@ import java.util.EnumMap; import java.util.HashMap; import java.util.Map; +import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.gmail.nossr50.util.player.NotificationManager; import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.entity.AnimalTamer; @@ -416,7 +418,7 @@ public final class CombatUtils { switch (type) { case SWORDS: if (entity instanceof Player) { - ((Player) entity).sendMessage(LocaleLoader.getString("Swords.Combat.SS.Struck")); + NotificationManager.sendPlayerInformation((Player)entity, NotificationType.SUBSKILL_MESSAGE, "Swords.Combat.SS.Struck"); } BleedTimerTask.add(livingEntity, Swords.serratedStrikesBleedTicks); @@ -424,7 +426,7 @@ public final class CombatUtils { case AXES: if (entity instanceof Player) { - ((Player) entity).sendMessage(LocaleLoader.getString("Axes.Combat.SS.Struck")); + NotificationManager.sendPlayerInformation((Player)entity, NotificationType.SUBSKILL_MESSAGE, "Axes.Combat.SS.Struck"); } break;