public void onEnable() {
        instance = this;
        try {

            OfflinePlayer.class.getDeclaredMethod("getUniqueId");
        } catch (Exception e) {
            getLogger().info("Your server is still not ready for UUIDs? Use PVP Stats older than v0.8.25.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }

        final PluginDescriptionFile pdfFile = getDescription();

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

        loadConfig();
        if(!this.mySQL) {
            getLogger().severe("MySQL disabled, plugin DISABLED!");
            getServer().getPluginManager().disablePlugin(this);
            return; //to ensure the rest of the plugins code is not executed as this can lead to problems.
        }
        loadHooks();

        if (getConfig().getBoolean("PVPArena")) {
            if (getServer().getPluginManager().isPluginEnabled("pvparena")) {
                getServer().getPluginManager().registerEvents(paListener, this);
            } else {
                paPluginListener = new PSPAPluginListener(this);
                getServer().getPluginManager().registerEvents(paPluginListener, this);
            }
        }

        if (getConfig().getBoolean("updatecheck", true)) {

            if (getConfig().getBoolean("autodownload", true)) {
                updater = new Updater(this, 32908, this.getFile(), UpdateType.NO_DOWNLOAD, false);
            } else {
                updater = new Updater(this, 32908, this.getFile(), UpdateType.DEFAULT, false);
            }
        }

        loadLanguage();

        if(getConfig().getBoolean("tracker", true)) { //only call the task if true
            getServer().getScheduler().runTaskTimer(this, new Tracker(this), 0L, 72000L);
        }

        if (getConfig().getBoolean("clearonstart", true)) {

            Bukkit.getScheduler().runTaskLater(this, new Runnable() { //run the task within its own runnable no need for an imbedded class
                @Override
                public void run() {
                    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), "pvpstats cleanup");
                }
            }, 5000L);
        }

        if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            getLogger().info("PVPStats - PlaceholderAPI found.");
            new PlaceholderAPIHook(getInstance(), "slipcorpvpstats").hook();
        }

        getLogger().info("enabled. (version " + pdfFile.getVersion() + ")");
    }