commit
54e47fcdb0
5 changed files with 8 additions and 14 deletions
2
pom.xml
2
pom.xml
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
<groupId>Hadder</groupId>
|
<groupId>Hadder</groupId>
|
||||||
<artifactId>Hadder</artifactId>
|
<artifactId>Hadder</artifactId>
|
||||||
<version>0.10-ALPHA</version>
|
<version>0.1-BETA</version>
|
||||||
|
|
||||||
<name>Hadder</name>
|
<name>Hadder</name>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import com.bbn.hadder.commands.CommandEvent;
|
||||||
import com.bbn.hadder.core.Perm;
|
import com.bbn.hadder.core.Perm;
|
||||||
import com.bbn.hadder.core.Perms;
|
import com.bbn.hadder.core.Perms;
|
||||||
import com.bbn.hadder.utils.MessageEditor;
|
import com.bbn.hadder.utils.MessageEditor;
|
||||||
import net.dv8tion.jda.api.Permission;
|
|
||||||
|
|
||||||
@Perms(Perm.MANAGE_SERVER)
|
@Perms(Perm.MANAGE_SERVER)
|
||||||
public class InviteDetectCommand implements Command {
|
public class InviteDetectCommand implements Command {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import com.bbn.hadder.commands.CommandEvent;
|
||||||
import com.bbn.hadder.core.Perm;
|
import com.bbn.hadder.core.Perm;
|
||||||
import com.bbn.hadder.core.Perms;
|
import com.bbn.hadder.core.Perms;
|
||||||
import com.bbn.hadder.utils.MessageEditor;
|
import com.bbn.hadder.utils.MessageEditor;
|
||||||
import net.dv8tion.jda.api.Permission;
|
|
||||||
|
|
||||||
@Perms(Perm.MANAGE_SERVER)
|
@Perms(Perm.MANAGE_SERVER)
|
||||||
public class PrefixCommand implements Command {
|
public class PrefixCommand implements Command {
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ package com.bbn.hadder.commands.owner;
|
||||||
|
|
||||||
import com.bbn.hadder.commands.Command;
|
import com.bbn.hadder.commands.Command;
|
||||||
import com.bbn.hadder.commands.CommandEvent;
|
import com.bbn.hadder.commands.CommandEvent;
|
||||||
import com.bbn.hadder.core.Perm;
|
|
||||||
import com.bbn.hadder.core.Perms;
|
|
||||||
import com.bbn.hadder.utils.MessageEditor.MessageType;
|
import com.bbn.hadder.utils.MessageEditor.MessageType;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,7 @@ public class CommandHandler {
|
||||||
|
|
||||||
CommandEvent commandEvent = new CommandEvent(event.getJDA(), event.getResponseNumber(), event.getMessage(), rethink,
|
CommandEvent commandEvent = new CommandEvent(event.getJDA(), event.getResponseNumber(), event.getMessage(), rethink,
|
||||||
config, this, helpCommand, new MessageEditor(rethink, event.getAuthor()));
|
config, this, helpCommand, new MessageEditor(rethink, event.getAuthor()));
|
||||||
if (cmd.getClass().getAnnotations().length>0) {
|
if (cmd.getClass().getAnnotations().length > 0 && !Arrays.asList(cmd.getClass().getAnnotations()).contains(Perms.class)) {
|
||||||
if (!Arrays.asList(cmd.getClass().getAnnotations()).contains(Perms.class)) {
|
|
||||||
for (Perm perm : cmd.getClass().getAnnotation(Perms.class).value()) {
|
for (Perm perm : cmd.getClass().getAnnotation(Perms.class).value()) {
|
||||||
if (!perm.check(commandEvent)) {
|
if (!perm.check(commandEvent)) {
|
||||||
commandEvent.getTextChannel()
|
commandEvent.getTextChannel()
|
||||||
|
|
@ -46,7 +45,6 @@ public class CommandHandler {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
cmd.executed(args, commandEvent);
|
cmd.executed(args, commandEvent);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue