mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Fixed bug where the API would fail if the name of a player's current
party is requested when the player isn't in one (Thanks @dualspiral!) Closes #843
This commit is contained in:
@ -19,9 +19,13 @@ public final class PartyAPI {
|
||||
* This function is designed for API usage.
|
||||
*
|
||||
* @param player The player to check the party name of
|
||||
* @return the name of the player's party
|
||||
* @return the name of the player's party, or null if not in a party
|
||||
*/
|
||||
public static String getPartyName(Player player) {
|
||||
if (!inParty(player)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return UserManager.getPlayer(player).getParty().getName();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user