mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-02-19 16:19: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
|
* @return all the players in the player's party
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
// TODO: I naively tried to add another getAllMembers that returns a List<OffflinePlayer>, but that wasn't possible
|
@Deprecated
|
||||||
// since the return type isn't part of the the method's signature. If anybody has an idea...
|
|
||||||
public static List<String> getAllMembers(Player player) {
|
public static List<String> getAllMembers(Player player) {
|
||||||
List<String> memberNames = new ArrayList<String>();
|
List<String> memberNames = new ArrayList<String>();
|
||||||
|
|
||||||
@ -137,6 +136,18 @@ public final class PartyAPI {
|
|||||||
return memberNames;
|
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.
|
* Get a list of all online players in this party.
|
||||||
* </br>
|
* </br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user