Make sure chat is not null - it may have been muted by another plugin