mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-30 20:11:32 +01:00
Added help text top and bottom
Fixed top-level-command weirdness. / is required in getUsage().
This commit is contained in:
parent
d86c763716
commit
7e9a287143
@ -28,7 +28,7 @@ general:
|
||||
commands:
|
||||
help:
|
||||
header: "&7=========== &c%bsb_plugin_name% &7==========="
|
||||
syntax: "&7/&b[usage] &a[parameters] &7: &e[description]"
|
||||
syntax: "&b[usage] &a[parameters] &7: &e[description]"
|
||||
end: "&7================================="
|
||||
admin:
|
||||
help:
|
||||
|
@ -289,7 +289,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
||||
|
||||
@Override
|
||||
public String getUsage() {
|
||||
return usage;
|
||||
return "/" + usage;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,6 +23,9 @@ public class DefaultHelpCommand extends CompositeCommand {
|
||||
|
||||
@Override
|
||||
public boolean execute(User user, List<String> args) {
|
||||
if (parent.getLevel() == 0) {
|
||||
user.sendMessage("commands.help.header");
|
||||
}
|
||||
if (args.isEmpty()) {
|
||||
if (!parent.getLabel().equals("help")) {
|
||||
// Get elements
|
||||
@ -55,6 +58,9 @@ public class DefaultHelpCommand extends CompositeCommand {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (parent.getLevel() == 0) {
|
||||
user.sendMessage("commands.help.end");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user