浏览代码

targetParty could have been null going into the PartyChangeEvent.

GJ 12 年之前
父节点
当前提交
3550c25b7d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/java/com/gmail/nossr50/party/commands/PartyCommand.java

+ 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.
         }