Joomla事件onContentAfterSave没有开火

I'm trying to run some code when a Joomla plugin config is saved and I've gone through the documentation and tried all content events I could find there with a die(); in them and none is triggered.

public function onContentAfterSave($context, $article, $isNew)
    {
        die();
    }

Can anyone point out how I can achieve this please?

onContentBeforeSave does just what the name suggests: fires before you save content not plugin configuration. In order to catch the saved plugin configuration you have no Joomla events available.

So you can check if the plugin configuration was changed at every page load in the administrator: the sequence would be:

Your plugin onContentBeforeDisplay (or some other events you don't need for your business logic) runs in the administrator only (which is the not the default behaviour, you'll need to check and exit if it's frontend to avoid slowing down your site) and in that event handler you check for a custom configuration field: to achieve this you just insert a custom (hidden) value in the plugin configuration. When your event fires, you load the plugin configuration and check if it's the default value or not, remove it from the configuration object and save it again to the db; so next time the user loads it it will change again, setting the default value. Not nice but it will work.