Check System Added and Massive Reformat
This commit is contained in:
@@ -9,38 +9,38 @@ import java.util.ArrayList;
|
||||
|
||||
public class CmdAutoHelp extends MCommand<P> {
|
||||
|
||||
public CmdAutoHelp() {
|
||||
super(P.p);
|
||||
this.aliases.add("?");
|
||||
this.aliases.add("h");
|
||||
this.aliases.add("help");
|
||||
public CmdAutoHelp() {
|
||||
super(P.p);
|
||||
this.aliases.add("?");
|
||||
this.aliases.add("h");
|
||||
this.aliases.add("help");
|
||||
|
||||
this.setHelpShort("");
|
||||
this.setHelpShort("");
|
||||
|
||||
this.optionalArgs.put("page", "1");
|
||||
}
|
||||
this.optionalArgs.put("page", "1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perform() {
|
||||
@Override
|
||||
public void perform() {
|
||||
|
||||
if (this.commandChain.size() == 0) {
|
||||
return;
|
||||
}
|
||||
MCommand<?> pcmd = this.commandChain.get(this.commandChain.size() - 1);
|
||||
if (this.commandChain.size() == 0) {
|
||||
return;
|
||||
}
|
||||
MCommand<?> pcmd = this.commandChain.get(this.commandChain.size() - 1);
|
||||
|
||||
ArrayList<String> lines = new ArrayList<>(pcmd.helpLong);
|
||||
ArrayList<String> lines = new ArrayList<>(pcmd.helpLong);
|
||||
|
||||
for (MCommand<?> scmd : pcmd.subCommands) {
|
||||
if (scmd.visibility == CommandVisibility.VISIBLE || (scmd.visibility == CommandVisibility.SECRET && scmd.validSenderPermissions(sender, false))) {
|
||||
lines.add(scmd.getUseageTemplate(this.commandChain, true));
|
||||
}
|
||||
}
|
||||
for (MCommand<?> scmd : pcmd.subCommands) {
|
||||
if (scmd.visibility == CommandVisibility.VISIBLE || (scmd.visibility == CommandVisibility.SECRET && scmd.validSenderPermissions(sender, false))) {
|
||||
lines.add(scmd.getUseageTemplate(this.commandChain, true));
|
||||
}
|
||||
}
|
||||
|
||||
sendMessage(p.txt.getPage(lines, this.argAsInt(0, 1), TL.COMMAND_AUTOHELP_HELPFOR.toString() + pcmd.aliases.get(0) + "\""));
|
||||
}
|
||||
sendMessage(p.txt.getPage(lines, this.argAsInt(0, 1), TL.COMMAND_AUTOHELP_HELPFOR.toString() + pcmd.aliases.get(0) + "\""));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_HELP_DESCRIPTION;
|
||||
}
|
||||
@Override
|
||||
public TL getUsageTranslation() {
|
||||
return TL.COMMAND_HELP_DESCRIPTION;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user