Sfoglia il codice sorgente

targetParty could have been null going into the PartyChangeEvent.

GJ 12 anni fa
parent
commit
3550c25b7d

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

@@ -214,7 +214,7 @@ public class PartyCommand implements CommandExecutor {
         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)) {
+        if (targetParty == null || !PartyManager.checkJoinability(player, targetParty, null)) {
             return true; // End before any event is fired.
         }