From ec3e5c21e0dcb8852a1b12f6081e699dd4834c79 Mon Sep 17 00:00:00 2001 From: Aria Date: Mon, 21 Oct 2019 06:50:59 +0200 Subject: [PATCH] Fixed the default action bar cycling for offline playerdata --- 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 7e5d7407..28cdfdb8 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -268,7 +268,7 @@ public class MMOCore extends JavaPlugin { //System.out.println("Tick!"); for (PlayerData data : PlayerData.getAll()) { - if(!data.isCasting() && !pausePlayers.contains(data.getUniqueId())) { + if (data.isOnline() && !data.getPlayer().isDead() && !data.isCasting() && !pausePlayers.contains(data.getUniqueId())) { //System.out.println("Display!"); 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)))