<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def onSettingsChange(self, plugin_name, data):
 """ The plugin has been changed by the frontend :param plugin_name: Name of plugin that changed :type plugin_name: str :param data: Complete data (changed and unchanged) :type data: dict :rtype: None """

        logger.info(u"onSettingsChange: {}".format(data))
        if not plugin_name:
            logger.error("Missing plugin name")
            return
        if not data:
            logger.error("Missing data")
            return
        logger.info(u"Sending data {}".format(data))
        reactor.callFromThread(self._sendJSON, {
            'msg': "plugin_data_set",
            'plugin_name': plugin_name,
            'data': data
        })
        # trigger db update
        reactor.callFromThread(self._sendJSON, {
            'msg': "plugin_data_get",
            'plugin_name': plugin_name
        })