use of com.builtbroken.mc.core.commands.ext.GroupSubCommand in project Engine by VoltzEngine-Project.
the class CommandGroup method handleConsoleCommand.
@Override
public boolean handleConsoleCommand(ICommandSender sender, String[] args) {
String name = args[0];
AccessGroup group = GroupProfileHandler.GLOBAL.getAccessProfile().getGroup(name);
if (group != null) {
if (args.length > 1) {
for (AbstractCommand command : subCommands) {
if (command instanceof GroupSubCommand && command.getCommandName().equalsIgnoreCase(args[1])) {
if (((GroupSubCommand) command).handle(sender, group, "", removeFront(args, 2))) {
return true;
}
}
}
}
sender.addChatMessage(new ChatComponentText("Unknown group sub command"));
} else {
sender.addChatMessage(new ChatComponentText("Unknown group"));
}
return true;
}
Aggregations