Skip to content

Commit

Permalink
Debug test.
Browse files Browse the repository at this point in the history
  • Loading branch information
DxsSucuk committed Jan 30, 2024
1 parent f0ced89 commit 564ed5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/de/presti/ree6/bot/BotConfig.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package de.presti.ree6.bot;

import de.presti.ree6.main.Main;
import lombok.extern.slf4j.Slf4j;

import java.awt.*;

/**
* Utility class to save long term used Data.
*/
@Slf4j
public class BotConfig {

/**
Expand Down Expand Up @@ -99,6 +101,12 @@ public static String getBotName() {
* @return if the module is activated.
*/
public static boolean isModuleActive(String moduleName) {
if (isDebug()) {
log.info("Checking if module " + moduleName + " is active.");
Object object = Main.getInstance().getConfig().getConfiguration().get("bot.misc.modules." + moduleName);
log.info("Module is null: " + (object == null));
if (object != null) log.info("Module is active: " + ((boolean) object));
}
return Main.getInstance().getConfig().getConfiguration().getBoolean("bot.misc.modules." + moduleName, true);
}

Expand Down

0 comments on commit 564ed5a

Please sign in to comment.