diff --git a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/task/WorldPlayerCounterTask.java b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/task/WorldPlayerCounterTask.java index 2f6c26ba..6a65bbc3 100644 --- a/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/task/WorldPlayerCounterTask.java +++ b/HolographicDisplays/Plugin/com/gmail/filoghost/holographicdisplays/task/WorldPlayerCounterTask.java @@ -1,9 +1,11 @@ package com.gmail.filoghost.holographicdisplays.task; +import java.util.List; import java.util.Map; import org.bukkit.Bukkit; import org.bukkit.World; +import org.bukkit.entity.Player; import com.gmail.filoghost.holographicdisplays.util.Utils; @@ -16,7 +18,15 @@ public class WorldPlayerCounterTask implements Runnable { worlds.clear(); for (World world : Bukkit.getWorlds()) { - worlds.put(world.getName(), world.getPlayers().size()); + List players = world.getPlayers(); + int count = 0; + + for (Player player : players) { + if (!player.hasMetadata("NPC")) { + count++; + } + } + worlds.put(world.getName(), count); } }