Fixed NPE with /mmoedit

This commit is contained in:
bm01
2012-06-12 22:51:57 +02:00
parent 89b5f8c275
commit 050b794b42
4 changed files with 34 additions and 65 deletions

View File

@ -56,7 +56,7 @@ public class Users {
}
//New player, or already removed from the list
PlayerProfile playerProfile = new PlayerProfile(player, true);
PlayerProfile playerProfile = new PlayerProfile(player, playerName, true);
profiles.add(playerProfile);
return playerProfile;
@ -78,29 +78,6 @@ public class Users {
return profiles;
}
/**
* Remove a user from the database.
*
* @param player The player to remove
*/
public static void removeUser(OfflinePlayer player) {
removeUser(player.getName());
}
/**
* Remove a user from the DB by name.
*
* @param playerName The name of the player to remove
*/
public static void removeUser(String playerName) {
for (Iterator<PlayerProfile> it = profiles.iterator() ; it.hasNext() ; ) {
if (it.next().getPlayerName().equals(playerName)) {
it.remove();
return;
}
}
}
/**
* Get the profile of a player.
*