2
0
Эх сурвалжийг харах

Fixed bug with retrieving a player's party members

GJ 12 жил өмнө
parent
commit
70e8e534fe

+ 1 - 0
Changelog.txt

@@ -14,6 +14,7 @@ Version 1.4.04-dev
  = Fixed bug where Mining wasn't awarding double drops
  = Fixed bug where Shake wouldn't damage mobs whose max health was less than 4
  = 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!)
+ = Fixed bug with retrieving a player's party members
  - Removed deprecated functions from API classes.
 
 Version 1.4.03

+ 7 - 1
src/main/java/com/gmail/nossr50/party/PartyManager.java

@@ -131,7 +131,13 @@ public final class PartyManager {
      * @return all online players in this party
      */
     public static List<Player> getOnlineMembers(Player player) {
-        return getOnlineMembers(player.getName());
+        Party party = getPlayerParty(player.getName());
+
+        if (party == null) {
+            return null;
+        }
+
+        return getOnlineMembers(party.getName());
     }
 
     /**