package com.skcraft.plume;

import com.sk89q.worldedit.util.eventbus.EventBus;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import org.apache.logging.log4j.Logger;

@Mod(modid = Plume.MODID, name = "Plume", dependencies = "required-after:worldedit")
public class Plume {
    
    public static final String MODID = "plume";

    @Instance(MODID)
    public static Plume INSTANCE;
    @SidedProxy(serverSide = "com.skcraft.plume.CommonProxy", clientSide = "com.skcraft.plume.ClientProxy")
    public static CommonProxy PROXY;

    private final EventBus eventBus = new EventBus();
    private Logger logger;

    public EventBus getEventBus() {
        return eventBus;
    }

    public Logger getLogger() {
        return logger;
    }

    @EventHandler
    public void preInit(FMLPreInitializationEvent event) {
        logger = event.getModLog();
        PROXY.preInit(event);
    }

    @EventHandler
    public void serverStarting(FMLServerStartingEvent event) {
        PROXY.serverStarting(event);
    }

}

@@ -72,16 +72,447 @@
 entBus;%0A
+import com.skcraft.plume.common.auth.Hive;%0Aimport com.skcraft.plume.common.ban.BanManager;%0Aimport com.skcraft.plume.common.party.PartyManager;%0Aimport com.skcraft.plume.common.sql.DatabaseBans;%0Aimport com.skcraft.plume.common.sql.DatabaseHive;%0Aimport com.skcraft.plume.common.sql.DatabaseManager;%0Aimport com.skcraft.plume.common.sql.DatabaseParties;%0Aimport com.zaxxer.hikari.HikariConfig;%0Aimport com.zaxxer.hikari.HikariDataSource;%0A
 import c
@@ -535,16 +535,16 @@
 on.Mod;%0A
-
 import c
@@ -773,24 +773,46 @@
 rtingEvent;%0A
+import lombok.Getter;%0A
 import org.a
@@ -840,16 +840,46 @@
 ogger;%0A%0A
+import javax.sql.DataSource;%0A%0A
 @Mod(mod
@@ -1311,16 +1311,182 @@
  logger;
+%0A    @Getter private DatabaseManager databaseManager;%0A    @Getter private BanManager banManager;%0A    @Getter private PartyManager partyManager;%0A    private Hive hive;
 %0A%0A    pu
@@ -1678,32 +1678,32 @@
 nEvent event) %7B%0A
-
         logger =
@@ -1718,24 +1718,648 @@
 etModLog();%0A
+%0A        // TODO: Read from a config%0A        HikariConfig config = new HikariConfig();%0A        config.setJdbcUrl(%22jdbc:mysql://localhost:3306/%22);%0A        config.setUsername(%22plume_dev%22);%0A        config.setPassword(%22plume_dev%22);%0A        DataSource dataSource = new HikariDataSource(config);;%0A%0A        databaseManager = new DatabaseManager(dataSource);%0A        databaseManager.setDataSchema(%22plume_data%22);%0A        databaseManager.setLogSchema(%22plume_log%22);%0A%0A        banManager = new DatabaseBans(databaseManager);%0A        hive = new DatabaseHive(databaseManager);%0A        partyManager = new DatabaseParties(databaseManager);%0A%0A
         PROX

Add basic init code.