diff --git a/src/main/java/com/massivecraft/factions/zcore/MCommand.java b/src/main/java/com/massivecraft/factions/zcore/MCommand.java index 713a0e6e..46bff02b 100644 --- a/src/main/java/com/massivecraft/factions/zcore/MCommand.java +++ b/src/main/java/com/massivecraft/factions/zcore/MCommand.java @@ -99,25 +99,27 @@ public abstract class MCommand { } this.args = args; this.commandChain = commandChain; - if (validCall(this.sender, this.args)) { - // This is always true but anyway - if (!this.isEnabled()) { - return; - } - // Is there a matching sub command? - if (args.size() > 0) { - for (MCommand subCommand : this.subCommands) { - if (subCommand.aliases.contains(args.get(0).toLowerCase())) { - args.remove(0); - commandChain.add(this); - subCommand.execute(sender, args, commandChain); - return; - } + + // Is there a matching sub command? + if (args.size() > 0) { + for (MCommand subCommand : this.subCommands) { + if (subCommand.aliases.contains(args.get(0).toLowerCase())) { + args.remove(0); + commandChain.add(this); + subCommand.execute(sender, args, commandChain); + return; } } - } else { + } + + if (!validCall(this.sender, this.args)) { return; } + + if (!this.isEnabled()) { + return; + } + perform(); } @@ -471,4 +473,4 @@ public abstract class MCommand { public Player argAsBestPlayerMatch(int idx) { return this.argAsPlayer(idx, null); } -} +} \ No newline at end of file