Improving the faction tag matching

This commit is contained in:
Olof Larsson
2011-10-22 17:42:13 +02:00
parent 75cd9b5e18
commit 7ebed6db9c
3 changed files with 22 additions and 7 deletions

View File

@@ -188,7 +188,7 @@ public class Faction extends Entity implements EconomyParticipator
// -------------------------------
// Relation and relation colors TODO
// Relation and relation colors
// -------------------------------
@Override
@@ -298,7 +298,7 @@ public class Faction extends Entity implements EconomyParticipator
}
// -------------------------------
// Fplayers
// FPlayers
// -------------------------------
public ArrayList<FPlayer> getFPlayers()
@@ -347,12 +347,15 @@ public class Faction extends Entity implements EconomyParticipator
return null;
}
public ArrayList<FPlayer> getFPlayersWhereRole(Role role) {
public ArrayList<FPlayer> getFPlayersWhereRole(Role role)
{
ArrayList<FPlayer> ret = new ArrayList<FPlayer>();
if ( ! this.isNormal()) return ret;
for (FPlayer fplayer : FPlayers.i.get()) {
if (fplayer.getFaction() == this && fplayer.getRole() == role) {
for (FPlayer fplayer : FPlayers.i.get())
{
if (fplayer.getFaction() == this && fplayer.getRole() == role)
{
ret.add(fplayer);
}
}