package io.github.satoshinm.WebSandboxMC.sponge;

import com.google.inject.Inject;
import com.sun.javafx.beans.annotations.Default;
import ninja.leaping.configurate.ConfigurationNode;
import ninja.leaping.configurate.ConfigurationOptions;
import ninja.leaping.configurate.commented.CommentedConfigurationNode;
import ninja.leaping.configurate.hocon.HoconConfigurationLoader;
import ninja.leaping.configurate.loader.ConfigurationLoader;
import org.slf4j.Logger;
import org.spongepowered.api.Game;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.config.ConfigDir;
import org.spongepowered.api.config.DefaultConfig;
import org.spongepowered.api.event.Listener;
import org.spongepowered.api.event.game.state.GameStartedServerEvent;
import org.spongepowered.api.plugin.Plugin;

import java.io.File;
import java.net.URL;
import java.nio.file.Path;

@Plugin(id = "websandboxmc", name = "WebSandboxMC", version = "1.6.0")
public class WebSandboxSpongePlugin {

    @Inject
    private Logger logger;

    @Inject
    @DefaultConfig(sharedRoot = false)
    private Path defaultConfig;

    @Inject
    @DefaultConfig(sharedRoot = false)
    private ConfigurationLoader<CommentedConfigurationNode> configManager;

    @Inject
    @ConfigDir(sharedRoot = false)
    private Path configDir;

    @Inject
    private Game game;

    @Listener
    public void onServerStart(GameStartedServerEvent event) {
        logger.info("WebSandboxMC/Sponge starting");
        logger.info("config path: " + configDir);

        ConfigurationLoader<CommentedConfigurationNode> loader = HoconConfigurationLoader.builder().setPath(configDir).build();
        ConfigurationNode rootNode = loader.createEmptyNode(ConfigurationOptions.defaults());
        //URL jarConfigFile = Sponge.getAssetManager().getAsset("defaultConfig.conf").get().getURL(); // TODO: can't find get?

    }
}

@@ -80,57 +80,8 @@
 ct;%0A
-import com.sun.javafx.beans.annotations.Default;%0A
 impo
@@ -444,45 +444,8 @@
 me;%0A
-import org.spongepowered.api.Sponge;%0A
 impo
@@ -702,50 +702,8 @@
 n;%0A%0A
-import java.io.File;%0Aimport java.net.URL;%0A
 impo

Remove unused import statements