Browse Source

Fixed a bug which made it impossible to join other players' parties.

TfT_02 12 years ago
parent
commit
1c328e7ac7
2 changed files with 5 additions and 2 deletions
  1. 1 0
      Changelog.txt
  2. 4 2
      src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java

+ 1 - 0
Changelog.txt

@@ -35,6 +35,7 @@ Version 1.4.00-dev
  = Fixed bug where all skill guide headers appeared as "Skillname Guide Guide"
  = Fixed bug where Impact was applied incorrectly due to an inverted method call
  = Fixed bug where Impact improperly determined the defender's armor
+ = Fixed a bug which made it impossible to join other players' parties
  = Fixed ArrayIndexOutOfBoundsException resulting from being unranked in a skill when using FlatFile
  = Fixed Woodcutting accidentally using Mining double drop values.
  = Fixed Hylian Luck not removing the block-placed flag from flowers.

+ 4 - 2
src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java

@@ -186,7 +186,9 @@ public class PartyCommand implements CommandExecutor {
             return false;
         }
 
-        if (!mcMMOPlayer.inParty()) {
+        McMMOPlayer mcMMOTarget = Users.getPlayer(target);
+
+        if (!mcMMOTarget.inParty()) {
             player.sendMessage(LocaleLoader.getString("Party.PlayerNotInParty", args[1]));
             return false;
         }
@@ -209,7 +211,7 @@ public class PartyCommand implements CommandExecutor {
             password = args[2];
         }
 
-        Party targetParty = Users.getPlayer(target).getParty();
+        Party targetParty = mcMMOTarget.getParty();
 
         // Check to see if the party exists, and if it does, can the player join it?
         if (targetParty != null && !PartyManager.checkJoinability(player, targetParty, null)) {