#How to run a function every x minute, second or hour

1 messages · Page 1 of 1 (latest)

keen pebble
#

title

hoary galleon
#

dude

ruby vault
#

Bukkit.getScheduler().runTaskTimer(JavaPlugin.getProvidingPlugin(this.getClass), () -> {
//TODO
},20L*seconds);

hoary galleon
#

I prefer runnables but whatever

ruby vault
#

Idk, Bukkit runnables are less readable

remote path
#

ScheduledExecutorService

ruby vault
#

Consider the level he is at, just using the api from spigot is adequate probably but yeah a single threaded scheduled es is better (:

keen pebble
#

thank you