public final void createAlliance(final MapleClient c, final String name) {
	if (allianceid != 0) {
	    c.getPlayer().dropMessage(1, "You are already in an Alliance!");
	    return;
	}
	if (checkAllianceName(name)) {
	    try {
		if (name.equals("") || id <= 0) {
		    return;
		}
		Connection con = DatabaseConnection.getConnection();
		PreparedStatement ps = con.prepareStatement("INSERT INTO `alliances` (notice, name, guild1, guild2, guild3, guild4, guild5, rank1, rank2, rank3, rank4, rank5) VALUES ('', ?, ?, 0, 0, 0, 0, 'Master', 'Jr. Master', 'Member', 'Member', 'Member')");
		ps.setString(1, name);
		ps.setInt(2, id);
		ps.executeUpdate();
		ps.close();

		ps = con.prepareStatement("SELECT id FROM alliances WHERE guild1 = ?");
		ps.setInt(1, id);
		ResultSet rs = ps.executeQuery();
		if (rs.next()) {
		    allianceid = rs.getInt("id");
		}
		rs.close();
		ps.close();
		writeToDB(false);
		c.getPlayer().dropMessage(1, "Alliance successfully created!");
	    } catch (SQLException a) {
	    }
	} else {
	    c.getPlayer().dropMessage(1, "This name already exists.");
	}
    }