mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Invert this check for clarity's sake.
This commit is contained in:
parent
ae3a95dd34
commit
ef5f72f56c
@ -17,6 +17,7 @@ import com.gmail.nossr50.locale.LocaleLoader;
|
|||||||
import com.gmail.nossr50.party.Party;
|
import com.gmail.nossr50.party.Party;
|
||||||
import com.gmail.nossr50.party.PartyManager;
|
import com.gmail.nossr50.party.PartyManager;
|
||||||
import com.gmail.nossr50.party.ShareHandler;
|
import com.gmail.nossr50.party.ShareHandler;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.Users;
|
import com.gmail.nossr50.util.Users;
|
||||||
|
|
||||||
public class PartyCommand implements CommandExecutor {
|
public class PartyCommand implements CommandExecutor {
|
||||||
@ -34,7 +35,8 @@ public class PartyCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommandHelper.noCommandPermissions(sender, "mcmmo.commands.party")) {
|
if (!Permissions.hasPermission(sender, "mcmmo.commands.party")) {
|
||||||
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +60,11 @@ public class PartyCommand implements CommandExecutor {
|
|||||||
return printHelp();
|
return printHelp();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mcMMOPlayer.inParty()) {
|
if (!mcMMOPlayer.inParty()) {
|
||||||
|
sender.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
||||||
|
return printUsage();
|
||||||
|
}
|
||||||
|
|
||||||
if (args[0].equalsIgnoreCase("quit") || args[0].equalsIgnoreCase("q") || args[0].equalsIgnoreCase("leave")) {
|
if (args[0].equalsIgnoreCase("quit") || args[0].equalsIgnoreCase("q") || args[0].equalsIgnoreCase("leave")) {
|
||||||
return partyQuitCommand.onCommand(sender, command, label, args);
|
return partyQuitCommand.onCommand(sender, command, label, args);
|
||||||
}
|
}
|
||||||
@ -97,10 +103,6 @@ public class PartyCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.sendMessage(LocaleLoader.getString("Commands.Party.None"));
|
|
||||||
return printUsage();
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean printUsage() {
|
private boolean printUsage() {
|
||||||
player.sendMessage(LocaleLoader.getString("Party.Help.0"));
|
player.sendMessage(LocaleLoader.getString("Party.Help.0"));
|
||||||
player.sendMessage(LocaleLoader.getString("Party.Help.1"));
|
player.sendMessage(LocaleLoader.getString("Party.Help.1"));
|
||||||
|
Loading…
Reference in New Issue
Block a user