#How to run a function every x minute, second or hour
1 messages · Page 1 of 1 (latest)
dude
Bukkit.getScheduler().runTaskTimer(JavaPlugin.getProvidingPlugin(this.getClass), () -> {
//TODO
},20L*seconds);
I prefer runnables but whatever
Idk, Bukkit runnables are less readable
ScheduledExecutorService
Consider the level he is at, just using the api from spigot is adequate probably but yeah a single threaded scheduled es is better (:
thank you