Skip to content

Commit

Permalink
🎨 Refactor module information retrieval
Browse files Browse the repository at this point in the history
Updated code to fetch module details using `getModuleInfo()` rather than direct accessors. This improves encapsulation and ensures consistency when retrieving module attributes like name, author, and version.
  • Loading branch information
ItsTheSky committed Jan 18, 2025
1 parent 7b8c768 commit 99b3a12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/info/itsthesky/disky/core/DiSkyCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
sb.append("== | Modules Information\n\n");
sb.append("Loaded Modules: ").append(DiSky.getModuleManager().getModules().size()).append("\n");
for (DiSkyModule module : DiSky.getModuleManager().getModules())
sb.append(" - ").append(module.getName()).append(" v").append(module.getVersion()).append("\n");
sb.append(" - ").append(module.getModuleInfo().name).append(" v").append(module.getModuleInfo().version).append("\n");
sb.append("\n");
});
debugSections.put("skript", () -> {
Expand Down Expand Up @@ -141,7 +141,7 @@ public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command
sender.sendMessage(Utils.colored("&b------ &9DiSky v" + DiSky.getInstance().getDescription().getVersion() + " Modules (" + DiSky.getModuleManager().getModules().size() + ") &b------"));
sender.sendMessage(Utils.colored(""));
for (DiSkyModule module : DiSky.getModuleManager().getModules())
sender.sendMessage(Utils.colored(" &7- &b" + module.getName() + " &3made by &b" + module.getAuthor() + " &3version &b" + module.getVersion()));
sender.sendMessage(Utils.colored(" &7- &b" + module.getModuleInfo().name + " &3made by &b" + module.getModuleInfo().author + " &3version &b" + module.getModuleInfo().version));
sender.sendMessage(Utils.colored(""));
return true;
} else if (args[0].equalsIgnoreCase("bots")) {
Expand Down

0 comments on commit 99b3a12

Please sign in to comment.