package org.aaron1011.whowas.impl.sponge;

import com.google.inject.Inject;
import org.slf4j.Logger;
import org.spongepowered.api.event.entity.living.player.fishing.PlayerCastFishingLineEvent;
import org.spongepowered.api.event.entity.living.player.fishing.PlayerHookedEntityEvent;
import org.spongepowered.api.event.entity.living.player.fishing.PlayerRetractFishingLineEvent;
import org.spongepowered.api.event.state.ServerStartedEvent;
import org.spongepowered.api.plugin.Plugin;
import org.spongepowered.api.service.config.ConfigDir;
import org.spongepowered.api.service.config.ConfigService;
import org.spongepowered.api.text.format.TextColors;
import org.spongepowered.api.text.message.Messages;
import org.spongepowered.api.util.event.Subscribe;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

@Plugin(id = "whowas", name = "Who Was", version = "1.1.0")
public class SpongePlugin {

    @Inject
    @ConfigDir(sharedRoot = false)
    File configDir;

    @Subscribe
    public void onServerStart(ServerStartedEvent event) {
        registerCommands(event);
    }

    private void registerCommands(ServerStartedEvent event) {
        System.out.println("Plugin started!");
        System.out.println("Config dir: " + configDir.getAbsolutePath());
        List<String> aliases = new ArrayList<String>();
        aliases.add("whoWas");
        aliases.add("ww");

        try {
            event.getGame().getCommandDispatcher().register(this, new SpongeCommandHandler(event.getGame()), aliases);
        } catch (Throwable t) {
            System.out.println("Oops!");
            t.printStackTrace();
        }

        // The Forge impl doesn't have any of this implemented yet...

        /**
        System.out.println("Getting service!");
        ConfigService service = event.getGame().getServiceManager().provideUnchecked(ConfigService.class);
        System.out.println("File: " + service.getPluginConfig(this));
        Logger logger = event.getGame().getPluginManager().getLogger(event.getGame().getPluginManager().fromInstance(this).get());
        logger.debug("Hello from logger!");
         **/
    }
}

@@ -1155,129 +1155,8 @@
 ) %7B%0A
-        System.out.println(%22Plugin started!%22);%0A        System.out.println(%22Config dir: %22 + configDir.getAbsolutePath());%0A
     
@@ -1270,26 +1270,8 @@
 );%0A%0A
-        try %7B%0A    
     
@@ -1385,621 +1385,8 @@
 s);%0A
-        %7D catch (Throwable t) %7B%0A            System.out.println(%22Oops!%22);%0A            t.printStackTrace();%0A        %7D%0A%0A        // The Forge impl doesn't have any of this implemented yet...%0A%0A        /**%0A        System.out.println(%22Getting service!%22);%0A        ConfigService service = event.getGame().getServiceManager().provideUnchecked(ConfigService.class);%0A        System.out.println(%22File: %22 + service.getPluginConfig(this));%0A        Logger logger = event.getGame().getPluginManager().getLogger(event.getGame().getPluginManager().fromInstance(this).get());%0A        logger.debug(%22Hello from logger!%22);%0A         **/%0A
     

Remove debugging prints