mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Fixed NPE with /mmoedit
This commit is contained in:
@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user