@Override
	public void onEnable() {

		// Setup plugin information
		name = this.getDescription().getName();
		version = this.getDescription().getVersion();

		// Text
		getServer().getConsoleSender().sendMessage(
				ChatColor.RESET
						+ "*********** Enabling MineAuction ***********");

		// Setting current instance up
		plugin = this;
		getServer().getConsoleSender().sendMessage(
				MineAuction.prefix + "Setting instance [ " + ChatColor.GREEN
						+ "OK" + ChatColor.RESET + " ]");

		// Setting configuration up
		config = new Config(this);
		getServer().getConsoleSender().sendMessage(
				MineAuction.prefix + "Loading configuration [ "
						+ ChatColor.GREEN + "OK" + ChatColor.RESET + " ]");

		// Setting lang up
		try {
			lang = new Lang(this);
			getServer().getConsoleSender().sendMessage(
					MineAuction.prefix + "Loading language files [ "
							+ ChatColor.GREEN + "OK" + ChatColor.RESET + " ]");
		} catch (Exception e) {
			getServer().getConsoleSender()
					.sendMessage(
							MineAuction.prefix + "Loading configuration [ "
									+ ChatColor.RED + "FAILED"
									+ ChatColor.RESET + " ]");
			getServer().getConsoleSender().sendMessage(
					ChatColor.WHITE
							+ "********************************************");
			getServer().getConsoleSender().sendMessage("Stacktrace: ");
			e.printStackTrace();
			onDisable();
			return;
		}

		// Setting database up
		try {
			db = new Database(this);
			db.openConnection();
			getServer().getConsoleSender().sendMessage(
					MineAuction.prefix + "Connecting to database [ "
							+ ChatColor.GREEN + "OK" + ChatColor.RESET + " ]");
		} catch (Exception e) {
			getServer().getConsoleSender()
					.sendMessage(
							MineAuction.prefix + "Connecting to database [ "
									+ ChatColor.RED + "FAILED"
									+ ChatColor.RESET + " ]");
			getServer().getConsoleSender().sendMessage(
					ChatColor.RESET
							+ "********************************************");
			getServer().getConsoleSender().sendMessage("Info: ");
			getServer().getConsoleSender().sendMessage(
					"Database exception occured: " + e.getMessage());
			onDisable();
			return;

		}

		// Register listeners
		blockListener = new MineAuctionBlockListener(this);
		playerListener = new MineAuctionPlayerListener(this);
		inventoryListener = new MineAuctionInventoryListener(this);

		getServer().getPluginManager().registerEvents(blockListener, this);
		getServer().getPluginManager().registerEvents(playerListener, this);
		getServer().getPluginManager().registerEvents(inventoryListener, this);

		// Register command listener
		this.getCommand("ma").setExecutor(new MineAuctionCommands(this));

		// Print debug information

		// Check database
		try {
			db.createTables();
			getServer().getConsoleSender().sendMessage(
					MineAuction.prefix + "Checking database structure [ "
							+ ChatColor.GREEN + "OK" + ChatColor.RESET + " ]");
		} catch (Exception e) {
			getServer().getConsoleSender()
					.sendMessage(
							MineAuction.prefix
									+ "Checking database structure [ "
									+ ChatColor.RED + "FAILED"
									+ ChatColor.RESET + " ]");
			getServer().getConsoleSender().sendMessage(
					ChatColor.WHITE
							+ "********************************************");
			getServer().getConsoleSender().sendMessage("Info: ");
			Log.info("Database exception occured: " + e.getMessage());
			e.printStackTrace();
			onDisable();
			return;
		}

		// End Text
		getServer().getConsoleSender().sendMessage(
				ChatColor.RESET
						+ "********************************************");

		// Plugin is OK
		if (enabled) {
			Log.debug("This plugin is now running in debug mode");
			Log.debug("Main class: " + this.getClass().getName());
		}

		// Enable features
		enabled = true;
	}