Reverted MCommand because 9ce8467224
commit broke it :/
This commit is contained in:
parent
262ca66437
commit
ef2ab6b4c6
@ -99,25 +99,27 @@ public abstract class MCommand<T extends MPlugin> {
|
|||||||
}
|
}
|
||||||
this.args = args;
|
this.args = args;
|
||||||
this.commandChain = commandChain;
|
this.commandChain = commandChain;
|
||||||
if (validCall(this.sender, this.args)) {
|
|
||||||
// This is always true but anyway
|
// Is there a matching sub command?
|
||||||
if (!this.isEnabled()) {
|
if (args.size() > 0) {
|
||||||
return;
|
for (MCommand<?> subCommand : this.subCommands) {
|
||||||
}
|
if (subCommand.aliases.contains(args.get(0).toLowerCase())) {
|
||||||
// Is there a matching sub command?
|
args.remove(0);
|
||||||
if (args.size() > 0) {
|
commandChain.add(this);
|
||||||
for (MCommand<?> subCommand : this.subCommands) {
|
subCommand.execute(sender, args, commandChain);
|
||||||
if (subCommand.aliases.contains(args.get(0).toLowerCase())) {
|
return;
|
||||||
args.remove(0);
|
|
||||||
commandChain.add(this);
|
|
||||||
subCommand.execute(sender, args, commandChain);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
if (!validCall(this.sender, this.args)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.isEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
perform();
|
perform();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user