mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-22 07:22:18 +00:00
Make command usage send with the correct label & bump version
This commit is contained in:
1 parent
d33a3ffcea
commit
24ff465679
60 files changed
+146
-144
No files matched your search
@@ -18,13 +18,13 @@ public abstract class MainCommand {
|
||||
private final String usage;
|
||||
private final int requiredArgsLength;
|
||||
|
||||
protected abstract void execute(LuckPermsPlugin plugin, Sender sender, List<String> args);
|
||||
protected abstract void execute(LuckPermsPlugin plugin, Sender sender, List<String> args, String label);
|
||||
protected abstract List<String> onTabComplete(Sender sender, List<String> args, LuckPermsPlugin plugin);
|
||||
public abstract List<? extends SubCommand> getSubCommands();
|
||||
|
||||
protected void sendUsage(Sender sender) {
|
||||
protected void sendUsage(Sender sender, String label) {
|
||||
if (getSubCommands().isEmpty()) {
|
||||
Util.sendPluginMessage(sender, "&e-> &d" + getUsage());
|
||||
Util.sendPluginMessage(sender, "&e-> &d" + String.format(getUsage(), label));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public abstract class MainCommand {
|
||||
Util.sendPluginMessage(sender, "&e" + getName() + " Sub Commands:");
|
||||
|
||||
for (SubCommand s : subs) {
|
||||
s.sendUsage(sender);
|
||||
s.sendUsage(sender, label);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user