Possible solution:
Add a getter in your CustomBreakManager to calculate time left as you did in shouldActivate()
public long getTimeLeft(){
//Logic here
}
In your main script extract the breakmanager variable:
CustomBreakManager breaker;
@Override
public void onStart() {
startTime = System.currentTimeMillis();
getExperienceTracker().start(Skill.MINING);
// Initialize the customBreakManager instance
breaker = new CustomBreakManager();
breaker.exchangeContext(getBot());
bot.getRandomExecutor().overrideOSBotRandom(breaker);
}
Add in your paint:
if(breaker != null){
long timeLeft = breaker.getTimeLeft();
//print it out
}
EDIT:
I see you already did something similar, but I believe you are using the wrong breakmanager variable?
Where does the customBreakManager variable comes from so suddenly?
This line -> long timeUntilBreak = customBreakManager.getNextBreakTime() - System.currentTimeMillis();