Don't provide direct access to the players map.

This commit is contained in:
GJ
2013-07-15 09:14:23 -04:00
parent dc9469c0cc
commit c9aba059e2
10 changed files with 18 additions and 12 deletions

View File

@ -1,8 +1,10 @@
package com.gmail.nossr50.util.player;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
@ -61,8 +63,12 @@ public final class UserManager {
}
}
public static Map<String, McMMOPlayer> getPlayers() {
return players;
public static Set<String> getPlayerNames() {
return players.keySet();
}
public static Collection<McMMOPlayer> getPlayers() {
return players.values();
}
/**