I'm pretty sure he's not a scripter, hence he's posting in the General Help section. But even if you were to implement that in a script, BreakManager is a RandomSolver which means it's executed by the RandomExecutor which stops the script threads (threads used by the EventExecutor probably) so whatever you do in onLoop will not execute after the BreakManager kicked in. What you can do though, is get the time until the next break and act accordingly in your script code.
As a user you can ask the scripter to implement support for taking breaks if their script is performing activities which involve combat. This, however may be a bit more difficult to implement and not many scripters will be willing to do it. It is not a problem on OSBot's end as the client cannot figure itself how to leave combat in any situation without damaging the script context, therefore it should be handled in script code.