L2Clan clan = new L2Clan(IdFactory.getInstance().getNextId(), clanName);
L2ClanMember leader = new L2ClanMember(clan, player.getName(), player.getLevel(), player.getClassId().getId(), player.getObjectId(), player.getPledgeType(), player.getPowerGrade(), player.getTitle());
clan.setLeader(leader);
leader.setPlayerInstance(player);
clan.store();
player.setClan(clan);
player.setPledgeClass(leader.calculatePledgeClass(player));
player.setClanPrivileges(L2Clan.CP_ALL);
if (Config.DEBUG)