Like @KielKing said, we cant see where its defined.
If its defined by getting plugin via server ( ` $server->getPluginManager()->getPlugin('PluginName ` ) if the plugin does not exits it will return null, also your getting PurePerms for no use in that section...
I would assume you meant to get PureChat and use that, if so i would check if its null before doing anything (as said above).

Like @KielKing said, we cant see where its defined.
If its defined by getting plugin via server ( ` $server->getPluginManager()->getPlugin('PluginName ` ) if the plugin does not exits it will return null, also your getting PurePerms for no use in that section...
I would assume you meant to get PureChat and use that, if so i would check if its null before doing anything (as said above).