parent
c947c887a1
commit
dd1f42d420
2 changed files with 5 additions and 1 deletions
|
@ -186,6 +186,7 @@ public abstract class Command2<TC extends ICommand2, TP extends Command2Sender>
|
|||
params.add(cg);
|
||||
else {
|
||||
sender.sendMessage("§cYou need to be a " + sendertype.getSimpleName() + " to use this command.");
|
||||
sender.sendMessage(sd.helpText); //Send what the command is about, could be useful for commands like /member where some subcommands aren't player-only
|
||||
return;
|
||||
}
|
||||
val paramArr = sd.method.getParameters();
|
||||
|
|
|
@ -63,8 +63,11 @@ public class Command2MC extends Command2<ICommand2MC, Command2MCSender> implemen
|
|||
if (command == null) return true; //Allow viewing the command - it doesn't do anything anyway
|
||||
String pg;
|
||||
boolean p = true;
|
||||
var cmdperm = "chroma.command." + command.getCommandPath().replace(' ', '.');
|
||||
var path = getCommandPath(method.getName(), '.');
|
||||
String[] perms = {
|
||||
"chroma.command." + command.getCommandPath().replace(' ', '.'),
|
||||
path.length() > 0 ? cmdperm + path : null,
|
||||
cmdperm,
|
||||
(pg = permGroup(command, method)).length() > 0 ? "chroma." + pg : null
|
||||
};
|
||||
for (String perm : perms) {
|
||||
|
|
Loading…
Reference in a new issue