Skip to content

Commit

Permalink
-fixed /be reload
Browse files Browse the repository at this point in the history
  • Loading branch information
Grzybol committed Nov 26, 2023
1 parent 42fa2b6 commit f0adf35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>betterbox.mine.game</groupId>
<artifactId>BetterElo</artifactId>
<version>3.0.22-SNAPSHOT</version>
<version>3.0.23-SNAPSHOT</version>
<packaging>jar</packaging>

<name>BetterElo</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class ExtendedConfigManager {
private JavaPlugin plugin;
private PluginLogger pluginLogger;
List<String> logLevels = null;
private File configFile = null;
Set<PluginLogger.LogLevel> enabledLogLevels;

public ExtendedConfigManager(JavaPlugin plugin, PluginLogger pluginLogger) {
Expand Down Expand Up @@ -47,7 +48,7 @@ private void configureLogger() {
public void ReloadConfig() {
pluginLogger.log(PluginLogger.LogLevel.DEBUG, "ConfigManager: ReloadConfig called");
// Odczytanie ustawień log_level z pliku konfiguracyjnego
File configFile = new File(plugin.getDataFolder(), "config.yml");
configFile = new File(plugin.getDataFolder(), "config.yml");
plugin.reloadConfig();
logLevels = plugin.getConfig().getStringList("log_level");
enabledLogLevels = new HashSet<>();
Expand All @@ -70,11 +71,13 @@ public void ReloadConfig() {
plugin.getServer().getLogger().warning("Invalid log level in config: " + level);
}
}
pluginLogger.setEnabledLogLevels(enabledLogLevels);

}

public void updateConfig(String configuration) {

File configFile = new File(plugin.getDataFolder(), "config.yml");
configFile = new File(plugin.getDataFolder(), "config.yml");

if (!configFile.exists()) {
pluginLogger.log(PluginLogger.LogLevel.WARNING, "Config file does not exist, creating new one.");
Expand Down

0 comments on commit f0adf35

Please sign in to comment.