I thought about this and I came up with a different solution. Assuming your plugin has a field called "class" in the XML.
$app = JFactory::getApplication();
$appParams = $app->getParams();
$class = "";
if ($this->params['class'])
{
$class = $this->params['class'];
}
$pageClass = $appParams['pageclass_sfx']$appParams['pageclass_sfx'];
if(!empty($pageClass))
{
$class = " " . $this->params['class'];
}
else
{
$class = $this->params['class'];
}
$pageClass = $pageClass . $class;
$app->setParams($pageClass);
As the menu/page class is already added to the body we can just concatenate ur new class