From 4da15abb062c333c223db7aaf4d87a7304108269 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Thu, 16 Jun 2011 02:33:41 -0500 Subject: [PATCH] fix for "No Faction" player count always returning 0 --- src/org/mcteam/factions/Faction.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/org/mcteam/factions/Faction.java b/src/org/mcteam/factions/Faction.java index 304b70dd..376be4cb 100644 --- a/src/org/mcteam/factions/Faction.java +++ b/src/org/mcteam/factions/Faction.java @@ -213,7 +213,7 @@ public class Faction { public ArrayList getFPlayers() { ArrayList ret = new ArrayList(); - if (id <= 0) + if (id < 0) return ret; for (FPlayer fplayer : FPlayer.getAll()) { @@ -227,7 +227,7 @@ public class Faction { public ArrayList getFPlayersWhereOnline(boolean online) { ArrayList ret = new ArrayList(); - if (id <= 0) + if (id < 0) return ret; for (FPlayer fplayer : FPlayer.getAll()) { @@ -255,7 +255,7 @@ public class Faction { public ArrayList getOnlinePlayers() { ArrayList ret = new ArrayList(); - if (id <= 0) + if (id < 0) return ret; for (Player player: Factions.instance.getServer().getOnlinePlayers()) { @@ -271,7 +271,7 @@ public class Faction { // slightly faster check than getOnlinePlayers() if you just want to see if there are any players online public boolean HasPlayersOnline() { // only real factions can have players online, not wilderness / safe zone / war zone - if (id <= 0) + if (id < 0) return false; for (Player player: Factions.instance.getServer().getOnlinePlayers()) {