@Override
    public void onEnable() {
        getConfig().options().copyDefaults(true);
        saveConfig();

        allDeaths = getConfig().getDouble("dropSkulls.allDeaths", 0);
        killedByPlayer = getConfig().getDouble("dropSkulls.killedByPlayer", 1);
        placeInKillerInv = getConfig().getBoolean("dropSkulls.placeInKillerInv", false);
        tax = getConfig().getDouble("bounty.tax", 0.05D);
        minimumBounty = getConfig().getDouble("bounty.minimum", 10);
        huntedDropOnly = getConfig().getBoolean("bounty.huntedDropOnly", false);
        canClaimOwn = getConfig().getBoolean("bounty.canClaimOwn", true);

        getServer().getPluginManager().registerEvents(this, this);

        getCommand("setname").setExecutor(new SetNameCommand());
        getCommand("clearname").setExecutor(new ClearNameCommand());
        getCommand("spawnhead").setExecutor(new SpawnHeadCommand(this));
        getCommand("bounty").setExecutor(new BountyCommand(this));

        if (getConfig().getBoolean("bounty.enabled")) {
            bounties = setupEconomy();
            if (bounties)
                getLogger().info("Econ detected");
            else
                getLogger().info("Econ not detected");
        }
        if (bounties) {
            if (getConfig().getString("datastorage").equalsIgnoreCase("mysql")) {
                try {
                    dsi = new MySQLDataStorageImplementation(this, getConfig().getString("database.url"), getConfig().getString("database.username"), getConfig().getString("database.password"));
                } catch (SQLException e) {
                    getLogger().log(Level.SEVERE, "Error connecting to mysql database", e);
                    bounties = false;
                }
            } else if (getConfig().getString("datastorage").equalsIgnoreCase("yaml")) {
                try {
                    dsi = new YamlDataStorageImplementation(this);
                } catch (IOException e) {
                    getLogger().log(Level.SEVERE, "Error setting up yaml storage", e);
                    bounties = false;
                }
            }
        }
        if (bounties)
            getLogger().info("Bounties enabled");
        else
            getLogger().info("Bounties not enabled");
    }