mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-02-16 22:59:35 +01:00
Add function to get a list of all players in a party to the API.
This commit is contained in:
parent
288907cfd4
commit
200ac53078
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user