if(player.isInDuel())
DuelManager.getInstance().onRemoveFromParty(player);
SystemMessage msg = new SystemMessage(SystemMessageId.YOU_LEFT_PARTY);
player.sendPacket(msg);
player.sendPacket(new PartySmallWindowDeleteAll());
player.setParty(null);
msg = new SystemMessage(SystemMessageId.S1_LEFT_PARTY);
msg.addString(player.getName());
broadcastToPartyMembers(msg);