forked from Upstream/mmocore
Fixed the default action bar cycling for offline playerdata
This commit is contained in:
parent
83466f92f9
commit
ec3e5c21e0
@ -268,7 +268,7 @@ public class MMOCore extends JavaPlugin {
|
|||||||
//System.out.println("Tick!");
|
//System.out.println("Tick!");
|
||||||
|
|
||||||
for (PlayerData data : PlayerData.getAll()) {
|
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!");
|
//System.out.println("Display!");
|
||||||
data.getPlayer().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(placeholderParser.parse(data.getPlayer(), ChatColor.translateAlternateColorCodes('&', getConfig().getString("action-bar.format")
|
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("{health}", format.format(data.getPlayer().getHealth())).replace("{max_health}", "" + StatType.MAX_HEALTH.format(data.getStats().getStat(StatType.MAX_HEALTH)))
|
||||||
|
Loading…
Reference in New Issue
Block a user