From b719d88a55a01ea0dd404d262ee1c6324fd1c8b4 Mon Sep 17 00:00:00 2001 From: Aria Date: Mon, 21 Oct 2019 06:58:03 +0200 Subject: [PATCH] Actually fixed default action bar --- src/main/java/net/Indyuce/mmocore/MMOCore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index e9964c3f..971f1957 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -267,7 +267,7 @@ public class MMOCore extends JavaPlugin { new BukkitRunnable() { public void run() { for (PlayerData data : PlayerData.getAll()) { - if (!data.isCasting() && !pausePlayers.contains(data.getUniqueId())) { + if (data.isOnline() && !data.getPlayer().isDead() && !data.isCasting() && !pausePlayers.contains(data.getUniqueId())) { data.getPlayer().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(placeholderParser.parse(data.getPlayer(), ChatColor.translateAlternateColorCodes('&', getConfig().getString("action-bar.format").replace("{health}", format.format(data.getPlayer().getHealth())) .replace("{max_health}", "" + StatType.MAX_HEALTH.format(data.getStats().getStat(StatType.MAX_HEALTH))).replace("{mana}", format.format(data.getMana()))