Skip to content

Commit

Permalink
Use component logger for dependencies on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
ryderbelserion committed Jul 11, 2024
1 parent fdce875 commit 2ca69b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/main/java/com/badbones69/crazycrates/CrazyCrates.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.badbones69.crazycrates.tasks.crates.CrateManager;
import com.ryderbelserion.vital.paper.enums.Support;
import com.ryderbelserion.vital.paper.files.config.FileManager;
import com.ryderbelserion.vital.paper.util.AdvUtil;
import me.arcaniax.hdb.api.HeadDatabaseAPI;
import org.bukkit.plugin.java.JavaPlugin;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -110,14 +111,12 @@ public void onEnable() {
).forEach(listener -> getServer().getPluginManager().registerEvents(listener, this));

if (MiscUtils.isLogging()) {
final String prefix = ConfigManager.getConfig().getProperty(ConfigKeys.console_prefix);

// Print dependency garbage
for (final Support value : Support.values()) {
if (value.isEnabled()) {
getServer().getConsoleSender().sendRichMessage(prefix + "<bold><gold>" + value.getName() + " <green>FOUND");
getComponentLogger().info(AdvUtil.parse("<bold><gold>" + value.getName() + " <green>FOUND"));
} else {
getServer().getConsoleSender().sendRichMessage(prefix + "<bold><gold>" + value.getName() + " <red>NOT FOUND");
getComponentLogger().info(AdvUtil.parse("<bold><gold>" + value.getName() + " <red>NOT FOUND"));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ public void registerComments(CommentsConfiguration conf) {
@Comment("The prefix used in commands")
public static final Property<String> command_prefix = newProperty("root.command_prefix", "<dark_gray>[<blue>CrazyCrates<dark_gray>]: ");

@Comment("The prefix used in console")
public static final Property<String> console_prefix = newProperty("root.console_prefix", "<dark_gray>[<blue>CrazyCrates<dark_gray>] ");

@Comment("If /crates should open the main menu. Warning: This will remove the menu button from crate previews.")
public static final Property<Boolean> enable_crate_menu = newProperty("gui.toggle", true);

Expand Down

0 comments on commit 2ca69b3

Please sign in to comment.