mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 16:12:17 +00:00
Add Lang
This commit is contained in:
1 parent
daf06e8d55
commit
33dd07d941
10 files changed
+43
-25
No files matched your search
@@ -79,7 +79,7 @@ public abstract class CommandKamkeelBase extends CommandBase{
|
||||
throw new CommandException("Unknown subcommand " + command);
|
||||
|
||||
SubCommand sc = m.getAnnotation(SubCommand.class);
|
||||
if(!sender.canCommandSenderUseCommand(sc.permission(), "commands.kamkeel." + getCommandName().toLowerCase() + "." + command.toLowerCase()))
|
||||
if(!sender.canCommandSenderUseCommand(sc.permission(), getSubCommandPermission(command)))
|
||||
throw new CommandException("You are not allowed to use this command: " + command);
|
||||
|
||||
canRun(sender, sc.usage(), args);
|
||||
@@ -111,4 +111,8 @@ public abstract class CommandKamkeelBase extends CommandBase{
|
||||
public int getRequiredPermissionLevel(){
|
||||
return 2;
|
||||
}
|
||||
|
||||
public String getSubCommandPermission(String subCommand){
|
||||
return "cnpc.kamkeel." + getCommandName().toLowerCase() + "." + subCommand.toLowerCase();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user