Add function to get a list of all players in a party to the API.

This commit is contained in:
GJ 2013-02-12 09:22:36 -05:00
parent 288907cfd4
commit 200ac53078

View File

@ -125,8 +125,7 @@ public final class PartyAPI {
* @return all the players in the player's party
* @deprecated
*/
// TODO: I naively tried to add another getAllMembers that returns a List<OffflinePlayer>, but that wasn't possible
// since the return type isn't part of the the method's signature. If anybody has an idea...
@Deprecated
public static List<String> getAllMembers(Player player) {
List<String> memberNames = new ArrayList<String>();
@ -137,6 +136,18 @@ public final class PartyAPI {
return memberNames;
}
/**
* Get a list of all players in this player's party.
* </br>
* This function is designed for API usage.
*
* @param player The player to check
* @return all the players in the player's party
*/
public static List<OfflinePlayer> getOnlineAndOfflineMembers(Player player) {
return PartyManager.getAllMembers(player);
}
/**
* Get a list of all online players in this party.
* </br>