Showing Dropping Anvil Something (Ignore)
This commit is contained in:
@@ -8,37 +8,37 @@ import java.util.ArrayList;
|
||||
|
||||
public class CmdAutoHelp extends FCommand {
|
||||
|
||||
public CmdAutoHelp() {
|
||||
this.aliases.add("?");
|
||||
this.aliases.add("h");
|
||||
this.aliases.add("help");
|
||||
public CmdAutoHelp() {
|
||||
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(CommandContext context) {
|
||||
if (context.commandChain.size() == 0) {
|
||||
return;
|
||||
}
|
||||
FCommand pcmd = context.commandChain.get(context.commandChain.size() - 1);
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
if (context.commandChain.size() == 0) {
|
||||
return;
|
||||
}
|
||||
FCommand pcmd = context.commandChain.get(context.commandChain.size() - 1);
|
||||
|
||||
ArrayList<String> lines = new ArrayList<>(pcmd.helpLong);
|
||||
ArrayList<String> lines = new ArrayList<>(pcmd.helpLong);
|
||||
|
||||
for (FCommand scmd : pcmd.subCommands) {
|
||||
if (scmd.visibility == CommandVisibility.VISIBLE) {
|
||||
lines.add(scmd.getUseageTemplate(context, true));
|
||||
}
|
||||
// TODO deal with other visibilities
|
||||
}
|
||||
for (FCommand scmd : pcmd.subCommands) {
|
||||
if (scmd.visibility == CommandVisibility.VISIBLE) {
|
||||
lines.add(scmd.getUseageTemplate(context, true));
|
||||
}
|
||||
// TODO deal with other visibilities
|
||||
}
|
||||
|
||||
context.sendMessage(FactionsPlugin.getInstance().txt.getPage(lines, context.argAsInt(0, 1), TL.COMMAND_AUTOHELP_HELPFOR.toString() + pcmd.aliases.get(0) + "\""));
|
||||
}
|
||||
context.sendMessage(FactionsPlugin.getInstance().txt.getPage(lines, context.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