@Override
	public void onEnable(){
		// Register necessary events
		pdfFile = this.getDescription();
		pm = this.getServer().getPluginManager();
		pm.registerEvents(new PlayerListener(this), this);

		// Check if vault is loaded (required for economy)
		VaultEnabled = setupEconomy();
		if (VaultEnabled) {
			Log("Found Vault! Hooking for economy!");
		} else {
			Log("Vault was not detected! Economy rewards are not available.");
		}
		
		// Read (or initialise) plugin config file
		cfg.LoadConfig(getConfig());

		// Save the default config (if one doesn't exist)
		saveDefaultConfig();

		if (USDateFormat) {
			InputDateFormat = "MM-dd-yyyy";
		} else {
			InputDateFormat = "dd-MM-yyyy";
		}
		
		// Open/initialise the database
		dbcon = new Database(this, "birthday.db");
		if (dbcon.IsConnected) {
			Log(pdfFile.getName() + " " + pdfFile.getVersion() + " has been enabled");
		} else {
			Log(pdfFile.getName() + " " + pdfFile.getVersion() + " could not be enabled!");
			this.setEnabled(false);
			return;
		}

		getCommand("birthday").setExecutor(new CommandBirthday(this));
		getCommand("birthdaygift").setExecutor(new CommandBirthdayGift(this));
		getCommand("birthdaygift").setAliases(Arrays.asList("bgift"));
	}