public Playmode[] getPlaymodes(){
		Playmode[] playmodes = null;
		try {
			Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
			String url = "jdbc:derby:" + DBName;
			Connection connection = DriverManager.getConnection(url);
			Statement statement = connection.createStatement();
			
			String getRanking = "SELECT * FROM playmodes, playmodeteams where playmodes.pmid = playmodeteams.pmid AND available = true ORDER BY playmodes.pmid";
			
			ResultSet rs = statement.executeQuery(getRanking);
			ArrayList<Playmode> alstPlaymodes = new ArrayList<>();
			int pmidCopy = -1;
			Playmode playmode = null;
			while(rs.next()){
				int pmid = rs.getInt("pmid");
				if(pmid != pmidCopy){
					// New Playmode
					pmidCopy = pmid;
					playmode = new Playmode(pmid, rs.getString("titel"), rs.getString("descText"));
					alstPlaymodes.add(playmode);
				}
				playmode.addTeam(new Team(rs.getInt("pmtID"), rs.getInt("size")));
			}
			playmodes = alstPlaymodes.toArray(new Playmode[0]);
			statement.close();
			connection.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return playmodes;
	}