    public void onEnable() {
        this.settings = new Settings(this); 
        if (this.getSettings().useMySQL()) {
            if (!this.initMySQL()) {
                this.getLogger().severe("Something is wrong with the MySQL database, switching to flatfile!");
                this.getSettings().setUseMySQL(false);
            }
        }
        this.warpManager = new WarpManager(this);
        this.getCommand("sortal").setExecutor(new SortalExecutor(this));
        this.getServer().getPluginManager().registerEvents(new EventListener(this), this);
        if(!this.initVault()){
            this.getLogger().info("Vault error or not found, setting costs to 0!");
            this.getSettings().setWarpCreatePrice(0);
            this.getSettings().setWarpUsePrice(0); 
        }else{
            this.getLogger().info("Hooked into Vault and Economy plugin succesfully!");
        }
        this.getServer().getScheduler().runTaskTimerAsynchronously(this, new Runnable(){
            public void run() {
                saveData();
                }
        }, 36000L, 36000L);
        this.startMetrics();
        if(this.getSettings().isUpdate()){
            new Updater(this, "sortal", this.getFile(), Updater.UpdateType.DEFAULT, true);
        }
        this.getServer().getPluginManager().getPermission("sortal.warp").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultWarp()));
        this.getServer().getPluginManager().getPermission("sortal.createwarp").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultCreateWarp()));
        this.getServer().getPluginManager().getPermission("sortal.delwarp").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultDelWarp()));
        this.getServer().getPluginManager().getPermission("sortal.list").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultList()));
        this.getServer().getPluginManager().getPermission("sortal.unregister").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultUnregister()));
        this.getServer().getPluginManager().getPermission("sortal.directwarp").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultDirectWarp()));
        this.getServer().getPluginManager().getPermission("sortal.placesign").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultPlaceSign()));
        this.getServer().getPluginManager().getPermission("sortal.setuses").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultSetUses()));
        this.getLogger().log(Level.INFO, String.format("Version %s build %s loaded!", this.getSettings().getVersion(), this.getDescription().getVersion()));
    }

    public void onEnable() {
        this.settings = new Settings(this); 
        if (this.getSettings().useMySQL()) {
            if (!this.initMySQL()) {
                this.getLogger().severe("Something is wrong with the MySQL database, switching to flatfile!");
                this.getSettings().setUseMySQL(false);
            }
        }
        this.warpManager = new WarpManager(this);
        this.getCommand("sortal").setExecutor(new SortalExecutor(this));
        this.getServer().getPluginManager().registerEvents(new EventListener(this), this);
        if(!this.initVault()){
            this.getLogger().info("Vault error or not found, setting costs to 0!");
            this.getSettings().setWarpCreatePrice(0);
            this.getSettings().setWarpUsePrice(0); 
        }else{
            this.getLogger().info("Hooked into Vault and Economy plugin succesfully!");
        }
        this.getServer().getScheduler().runTaskTimerAsynchronously(this, new Runnable(){
            public void run() {
                saveData();
            }
        }, 36000L, 36000L);
        this.startMetrics();
        if(this.getSettings().isUpdate()){
            new Updater(this, "sortal", this.getFile(), Updater.UpdateType.DEFAULT, true);
        }
        this.getServer().getPluginManager().getPermission("sortal.warp").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultWarp()));
        this.getServer().getPluginManager().getPermission("sortal.createwarp").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultCreateWarp()));
        this.getServer().getPluginManager().getPermission("sortal.delwarp").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultDelWarp()));
        this.getServer().getPluginManager().getPermission("sortal.list").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultList()));
        this.getServer().getPluginManager().getPermission("sortal.unregister").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultUnregister()));
        this.getServer().getPluginManager().getPermission("sortal.directwarp").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultDirectWarp()));
        this.getServer().getPluginManager().getPermission("sortal.placesign").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultPlaceSign()));
        this.getServer().getPluginManager().getPermission("sortal.setuses").setDefault(PermissionDefault.getByName(this.getSettings().getDefaultSetUses()));
        this.getLogger().log(Level.INFO, String.format("Version %s build %s loaded!", this.getSettings().getVersion(), this.getDescription().getVersion()));
    }
