src/main/java/xyz/tehbrian/buildersreach/BuildersReach.java
public boolean loadConfiguration() {
        this.saveResourceSilently("lang.yml");
        this.saveResourceSilently("config.yml");

        final List<Config> configsToLoad = List.of(
                this.injector.getInstance(LangConfig.class),
                this.injector.getInstance(ConfigConfig.class)
        );

        for (final Config config : configsToLoad) {
            try {
                config.load();
            } catch (final ConfigurateException e) {
                this.getLog4JLogger().error("Exception caught during config load for {}", config.configurateWrapper().filePath());
                this.getLog4JLogger().error("Please check your config.");
                this.getLog4JLogger().error("Printing stack trace:", e);
                return false;
            }
        }

        this.setHighlighter();

        this.getLog4JLogger().info("Successfully loaded configuration.");
        return true;
    }
/**
     * Loads the plugin's configuration. If an exception is caught, logs the
     * error and returns false.
     *
     * @return whether or not the loading was successful
     */
Loads the plugin's configuration. If an exception is caught, logs the
error and returns false.

@return whether or not the loading was successful
Loads the plugin ' s configuration . If an exception is caught logs the error and returns false . @return whether or not the loading was successful
public boolean loadConfiguration() {
        this.saveResourceSilently("lang.yml");
        this.saveResourceSilently("config.yml");
        final List<Config> configsToLoad = List.of(
                this.injector.getInstance(LangConfig.class),
                this.injector.getInstance(ConfigConfig.class)
        );
        for (final Config config : configsToLoad) {
            try {
                config.load();
            } catch (final ConfigurateException e) {
                this.getLog4JLogger().error("Exception caught during config load for {}", config.configurateWrapper().filePath());
                this.getLog4JLogger().error("Please check your config.");
                this.getLog4JLogger().error("Printing stack trace:", e);
                return false;
            }
        }
        this.setHighlighter();
        this.getLog4JLogger().info("Successfully loaded configuration.");
        return true;
    }
public boolean loadConfiguration ( ) { this . saveResourceSilently ( "lang.yml" ) ; this . saveResourceSilently ( "config.yml" ) ; final List < Config > configsToLoad = List . of ( this . injector . getInstance ( LangConfig . class ) , this . injector . getInstance ( ConfigConfig . class ) ) ; for ( final Config config : configsToLoad ) { try { config . load ( ) ; } catch ( final ConfigurateException e ) { this . getLog4JLogger ( ) . error ( "Exception caught during config load for {}" , config . configurateWrapper ( ) . filePath ( ) ) ; this . getLog4JLogger ( ) . error ( "Please check your config." ) ; this . getLog4JLogger ( ) . error ( "Printing stack trace:" , e ) ; return false ; } } this . setHighlighter ( ) ; this . getLog4JLogger ( ) . info ( "Successfully loaded configuration." ) ; return true ; }
Loads the plugin's configuration.
Loads the plugin ' s configuration .