Replaced playerName fields in PlayerProfile and Users by the Player object

This commit is contained in:
bm01
2012-06-06 01:19:39 +02:00
parent b8be1d1866
commit 56aff1d191
13 changed files with 72 additions and 74 deletions

View File

@ -148,12 +148,10 @@ public class Party {
*/
public ArrayList<Player> getAllMembers(Player player) {
ArrayList<Player> players = new ArrayList<Player>();
HashMap<String, PlayerProfile> profiles = Users.getProfiles();
HashMap<Player, PlayerProfile> profiles = Users.getProfiles();
if (player != null) {
for (String name : profiles.keySet()) {
Player otherPlayer = profiles.get(name).getPlayer();
for (Player otherPlayer : profiles.keySet()) {
if (otherPlayer != null && inSameParty(otherPlayer, player)) {
players.add(otherPlayer);
}