fix for "No Faction" player count always returning 0

This commit is contained in:
Brettflan 2011-06-16 02:33:41 -05:00
parent cddaa73948
commit 4da15abb06
1 changed files with 4 additions and 4 deletions

View File

@ -213,7 +213,7 @@ public class Faction {
public ArrayList<FPlayer> getFPlayers() {
ArrayList<FPlayer> ret = new ArrayList<FPlayer>();
if (id <= 0)
if (id < 0)
return ret;
for (FPlayer fplayer : FPlayer.getAll()) {
@ -227,7 +227,7 @@ public class Faction {
public ArrayList<FPlayer> getFPlayersWhereOnline(boolean online) {
ArrayList<FPlayer> ret = new ArrayList<FPlayer>();
if (id <= 0)
if (id < 0)
return ret;
for (FPlayer fplayer : FPlayer.getAll()) {
@ -255,7 +255,7 @@ public class Faction {
public ArrayList<Player> getOnlinePlayers() {
ArrayList<Player> ret = new ArrayList<Player>();
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()) {