private void patchDB() throws DBConnectFail {
		int version = 0;
		try {
			ResultSet rs = this.connection.createStatement().executeQuery("SELECT dbVersion FROM config");
			rs.next();
			version = rs.getInt(1);
		} catch (SQLException e) {
			StatisticianPlugin.getInstance().getLogger().info("Could not find a database version, creating one from scratch.");
			version = 0;
		}

        System.out.println("**************version="+version);
        System.out.println("**************DB version="+Config.getDBVersion());
		if (version < Config.getDBVersion()) {
			StatisticianPlugin.getInstance().getLogger().info("Patching database from v" + version + " to v" + Config.getDBVersion() + ".");

			while (version < Config.getDBVersion()) {
				++version;

				InputStream is = this.getClass().getClassLoader().getResourceAsStream("SQLPatches/stats_v" + version + ".sql");
				if (is == null) throw new DBConnectFail("Could not load database patch v" + version + ".");

				ScriptRunner sr = new ScriptRunner(this.connection);
				sr.setLogWriter(null);
				sr.setErrorLogWriter(null);
				sr.setAutoCommit(false);
				sr.setStopOnError(true);
				sr.setSendFullScript(false);
				sr.setRemoveCRs(true);
				try {
					sr.runScript(new InputStreamReader(is));
				} catch (RuntimeSqlException e) {
					throw new DBConnectFail("An error occured while executing the database patch v" + version + ".", e);
				}
			}

			StatisticianPlugin.getInstance().getLogger().info("Database patched to version " + version + ".");
		}
			HashSet<Position> positions = new HashSet<>();
			List<Map<String, String>> results =
					this.executeSynchQuery("select * from mc_statistician.LeverLocationTable;");

			if (results != null) {

				if (results.size() > 0) {
					for(Map<String, String> keyValuePair: results){
						int x = Integer.parseInt(keyValuePair.get("x"));
						int y = Integer.parseInt(keyValuePair.get("y"));
						int z = Integer.parseInt(keyValuePair.get("z"));
						positions.add(new Position(x,y,z));
					}
				}
//				System.out.println("Found "+positions.size()+ " levers");
			}else {
				System.out.println("Unsucessful Query :( ");
			}

			_InternalPlayer.positions = positions;

		
	}