for(Player player : getPlayers().getAll()){
Why do you need to get all players nearby?
And you could use a Timer class (which you would have to implement yourself) or.. use the /general/ Timer class of a few years back: https://github.com/dunnkers/RSBot-API/blob/master/util/Timer.java