fix wrong period/timeunit for folia scheduling

This commit is contained in:
Josh Roy 2023-04-12 18:45:22 -04:00
parent 4cb861badc
commit ec5007c07e
No known key found for this signature in database
GPG Key ID: 86A69D08540BC29A

View File

@ -115,7 +115,7 @@ public class FoliaSchedulingProvider implements SchedulingProvider, Listener {
@Override
public EssentialsTask runAsyncTaskRepeating(Runnable runnable, long delay, long period) {
final ScheduledTask task = plugin.getServer().getAsyncScheduler().runAtFixedRate(plugin, scheduledTask -> runnable.run(), delay, delay * 50, TimeUnit.MICROSECONDS);
final ScheduledTask task = plugin.getServer().getAsyncScheduler().runAtFixedRate(plugin, scheduledTask -> runnable.run(), delay, period * 50, TimeUnit.MILLISECONDS);
return task::cancel;
}