From 5c3e1adee2deb717b67706589ba401cba84b3cb4 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Wed, 19 Sep 2018 14:57:53 -0400 Subject: [PATCH] Fix this annoying wart --- .../java/com/velocitypowered/api/scheduler/Scheduler.java | 4 ++-- .../velocitypowered/proxy/scheduler/VelocityScheduler.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/com/velocitypowered/api/scheduler/Scheduler.java b/api/src/main/java/com/velocitypowered/api/scheduler/Scheduler.java index fd652d1c6..2854a664c 100644 --- a/api/src/main/java/com/velocitypowered/api/scheduler/Scheduler.java +++ b/api/src/main/java/com/velocitypowered/api/scheduler/Scheduler.java @@ -24,7 +24,7 @@ public interface Scheduler { * @param unit the unit of time for {@code time} * @return this builder, for chaining */ - TaskBuilder delay(int time, TimeUnit unit); + TaskBuilder delay(long time, TimeUnit unit); /** * Specifies that the task should continue running after waiting for the specified amount, until it is cancelled. @@ -32,7 +32,7 @@ public interface Scheduler { * @param unit the unit of time for {@code time} * @return this builder, for chaining */ - TaskBuilder repeat(int time, TimeUnit unit); + TaskBuilder repeat(long time, TimeUnit unit); /** * Clears the delay on this task. diff --git a/proxy/src/main/java/com/velocitypowered/proxy/scheduler/VelocityScheduler.java b/proxy/src/main/java/com/velocitypowered/proxy/scheduler/VelocityScheduler.java index 0b0d110d9..d37abc0e3 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/scheduler/VelocityScheduler.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/scheduler/VelocityScheduler.java @@ -65,13 +65,13 @@ public class VelocityScheduler implements Scheduler { } @Override - public TaskBuilder delay(int time, TimeUnit unit) { + public TaskBuilder delay(long time, TimeUnit unit) { this.delay = unit.toMillis(time); return this; } @Override - public TaskBuilder repeat(int time, TimeUnit unit) { + public TaskBuilder repeat(long time, TimeUnit unit) { this.repeat = unit.toMillis(time); return this; }