fix for "No Faction" player count always returning 0
This commit is contained in:
		@@ -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()) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user