Skip to content

Commit

Permalink
verbose-logging config option wasn't applying to everything in the pl…
Browse files Browse the repository at this point in the history
…ugin.
  • Loading branch information
ryderbelserion committed Jul 23, 2024
1 parent 1cc84f7 commit 30169b6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ Items:
- 'Item:spawner, Glowing:true'
```
### Fixed:
- The config option for `verbose-logging` was not applied to some parts of the plugin.

### Changes:
- No longer add the contents of `DisplayData` to the `Items` section on `/crazycrates reload`
12 changes: 11 additions & 1 deletion src/main/java/com/badbones69/crazycrates/CrazyCrates.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import com.badbones69.crazycrates.api.objects.other.Server;
import com.badbones69.crazycrates.api.utils.MiscUtils;
import com.badbones69.crazycrates.commands.CommandManager;
import com.badbones69.crazycrates.config.ConfigManager;
import com.badbones69.crazycrates.config.impl.ConfigKeys;
import com.badbones69.crazycrates.listeners.BrokeLocationsListener;
import com.badbones69.crazycrates.listeners.CrateControlListener;
import com.badbones69.crazycrates.listeners.MiscListener;
Expand Down Expand Up @@ -55,13 +57,17 @@ public CrazyCrates() {

private Server instance;

private VitalPaper paper;

@Override
public void onEnable() {
new VitalPaper(this);
this.paper = new VitalPaper(this);

this.instance = new Server(getDataFolder());
this.instance.apply();

this.paper.setLogging(ConfigManager.getConfig().getProperty(ConfigKeys.verbose_logging));

this.fileManager = new FileManager();
this.fileManager.addFile("locations.yml").addFile("data.yml")
.addFolder("crates")
Expand Down Expand Up @@ -194,4 +200,8 @@ public void onDisable() {
public @NotNull final Timer getTimer() {
return this.timer;
}

public final VitalPaper getPaper() {
return this.paper;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.badbones69.crazycrates.api.enums.Files;
import com.badbones69.crazycrates.api.enums.Messages;
import com.badbones69.crazycrates.commands.crates.types.BaseCommand;
import com.badbones69.crazycrates.config.ConfigManager;
import dev.triumphteam.cmd.bukkit.annotation.Permission;
import dev.triumphteam.cmd.core.annotations.Command;
import org.bukkit.command.CommandSender;
Expand All @@ -19,6 +20,8 @@ public void reload(CommandSender sender) {

this.fileManager.reloadFiles().init();

this.plugin.getPaper().setLogging(ConfigManager.getConfig().getProperty(ConfigKeys.verbose_logging));

final YamlConfiguration locations = Files.locations.getConfiguration();
final YamlConfiguration data = Files.data.getConfiguration();

Expand Down

0 comments on commit 30169b6

Please sign in to comment.