public User[] loadUsers(ChatChannel channel){
		User[] users = null;
		try {
			Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
			String url = "jdbc:derby:" + DBName;
			Connection connection = DriverManager.getConnection(url);
			Statement statement = connection.createStatement();
			
			String sqlStatement = "SELECT * FROM userchatrelations, users, userChannelRelationshipTypes "
								+ "WHERE userchatrelations.channelID = " + channel.getChannelID() + " "
								+ "AND userchatrelations.userid = users.uid "
								+ "AND userChannelRelationshipTypes.ucrtID = (SELECT ucrtid FROM userChannelRelationshipTypes WHERE rtype='online')";
			
			
			ResultSet rs = statement.executeQuery(sqlStatement);
			ArrayList<User> alstUsers = new ArrayList<>();
			while(rs.next()){
				User user = new User(rs.getString("juser"), null);
				user.setID(rs.getInt("uid"));
				user.setValidLogin(true);
				user.setNick(rs.getString("jnick"));
				user.setLevel(rs.getInt("level"));
				user.setCurrentExp(rs.getInt("currentExp"));
				user.setrCoins(rs.getInt("rcoins"));
				user.setvCoins(rs.getInt("vcoins"));
				user.setPoints(rs.getInt("points"));
				user.setLastLogin(rs.getTimestamp("jlastloggin"));
				alstUsers.add(user);
			}
			users = alstUsers.toArray(new User[0]);
			statement.close();
			connection.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return users;
	}