Skip to content

Commit

Permalink
Init data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
md5sha256 committed Jan 1, 2025
1 parent d32bf0f commit 7fcb032
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ public final class AddictiveExperiencePlugin extends JavaPlugin implements Addic
return this.addictiveExperienceConfiguration;
}

private void initDataFolder() {
if (!getDataFolder().isDirectory()) {
getDataFolder().mkdirs();
}
}

private void initializeInjector() {
getLogger().info("Initialising the injector...");
final Injector injector = Guice
Expand Down Expand Up @@ -104,6 +110,7 @@ public void onDisable() {
@Override
public void onEnable() {
super.onEnable();
initDataFolder();
try {
initializeInjector();
} catch (Throwable ex) {
Expand Down

0 comments on commit 7fcb032

Please sign in to comment.