Skip to content

Commit

Permalink
Move config resolve to main
Browse files Browse the repository at this point in the history
  • Loading branch information
LXGaming committed May 15, 2018
1 parent 896513c commit d8af47a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Sledgehammer {

private static Sledgehammer instance;
private final Logger logger = LoggerFactory.getLogger(Reference.PLUGIN_NAME);
private final Configuration configuration = new Configuration(SpongeLaunch.getConfigDir());
private final Configuration configuration = new Configuration(SpongeLaunch.getConfigDir().resolve(Reference.PLUGIN_ID + ".conf"));
private final Map<String, Function<MixinCategory, Boolean>> mixinMappings = Toolbox.newHashMap();
private PluginContainer pluginContainer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package io.github.lxgaming.sledgehammer.configuration;

import io.github.lxgaming.sledgehammer.Sledgehammer;
import io.github.lxgaming.sledgehammer.util.Reference;
import ninja.leaping.configurate.ConfigurationOptions;
import ninja.leaping.configurate.commented.CommentedConfigurationNode;
import ninja.leaping.configurate.hocon.HoconConfigurationLoader;
Expand All @@ -38,7 +37,7 @@ public class Configuration {

public Configuration(Path path) {
try {
this.configurationLoader = HoconConfigurationLoader.builder().setPath(path.resolve(Reference.PLUGIN_ID + ".conf")).build();
this.configurationLoader = HoconConfigurationLoader.builder().setPath(path).build();
this.objectMapper = ObjectMapper.forClass(Config.class).bindToNew();
} catch (Exception ex) {
Sledgehammer.getInstance().getLogger().error("Encountered an error initializing {}", getClass().getSimpleName(), ex);
Expand Down

0 comments on commit d8af47a

Please sign in to comment.