mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-22 10:15:51 +01:00
fix for "No Faction" player count always returning 0
This commit is contained in:
parent
cddaa73948
commit
4da15abb06
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user