Dev mode bug
This commit is contained in:
parent
c25b71ff55
commit
a4d53407cd
@ -38,14 +38,15 @@ public class CommandLoader {
|
|||||||
if (!command.isAnnotationPresent(Ignore.class)) {
|
if (!command.isAnnotationPresent(Ignore.class)) {
|
||||||
logger.info("..." + name);
|
logger.info("..." + name);
|
||||||
|
|
||||||
if (!command.isAnnotationPresent(NoDev.class) && MainBot.dev) {
|
if (command.isAnnotationPresent(NoDev.class) && MainBot.dev) {
|
||||||
|
logger.warn("Command disable in dev mode");
|
||||||
|
}else{
|
||||||
try {
|
try {
|
||||||
MainBot.commandes.put(name, command.newInstance());
|
MainBot.commandes.put(name, command.newInstance());
|
||||||
} catch (InstantiationException | IllegalAccessException e) {
|
} catch (InstantiationException | IllegalAccessException e) {
|
||||||
logger.error("Failed to load " + name + "!");
|
logger.error("Failed to load " + name + "!");
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
logger.warn("Command disable in dev mode");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user