Skip to content

Commit

Permalink
In english please !
Browse files Browse the repository at this point in the history
  • Loading branch information
Euphillya committed Jan 16, 2025
1 parent fd04730 commit 30e92c6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugin/src/main/java/fr/euphyllia/skyllia/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ public void onEnable() {
return;
}

loadAddons();

initializeCommandsDispatcher();

initializeManagers();
registerListeners();
scheduleCacheUpdate();
checkDisabledConfig();

loadAddons();

new Metrics(this, 20874);
}

Expand All @@ -84,7 +84,7 @@ public void onDisable() {
try {
addon.onDisabled();
} catch (Exception exception) {
logger.error("Error addons"); // Todo rename
logger.log(Level.ERROR, "Error disabling addon: {}", addon.getClass().getName(), exception);
}
}
Bukkit.getAsyncScheduler().cancelTasks(this);
Expand Down Expand Up @@ -210,16 +210,16 @@ private void initializeCommandsDispatcher() {


private void loadAddons() {
File extensionsDir = new File(getDataFolder(), "extensions");
File extensionsDir = new File(getDataFolder(), "addons");
if (!extensionsDir.exists()) {
extensionsDir.mkdirs();
logger.info("Création du dossier d'extensions: {}", extensionsDir.getAbsolutePath());
logger.info("Addon directory created at {}", extensionsDir.getAbsolutePath());
return;
}

File[] files = extensionsDir.listFiles((dir, name) -> name.endsWith(".jar"));
if (files == null) {
logger.warn("Aucun fichier d'extension trouvé dans {}", extensionsDir.getAbsolutePath());
logger.warn("No addon files found in {}", extensionsDir.getAbsolutePath());
return;
}

Expand All @@ -233,10 +233,10 @@ private void loadAddons() {
addon.onLoad(this);
addon.onEnable();
addons.add(addon);
logger.info("Addon chargé: {}", addon.getClass().getName());
logger.info("Addon loaded: {}", addon.getClass().getName());
}
} catch (Exception e) {
logger.log(Level.ERROR, "Erreur lors du chargement de l'addon: {}", file.getName(), e);
logger.log(Level.ERROR, "Failed to load addon: {}", file.getName(), e);
}
}
}
Expand Down

0 comments on commit 30e92c6

Please sign in to comment.