Add null check

This commit is contained in:
Németh Noel 2021-06-30 22:14:58 +02:00
parent a5a370783d
commit ec4d24b9a8

View File

@ -432,7 +432,7 @@ public abstract class Instance implements BlockModifier, Tickable, TagHandler, P
@SuppressWarnings("removal")
@Deprecated(forRemoval = true)
public void setTimeUpdate(@Nullable net.minestom.server.utils.time.UpdateOption timeUpdate) {
setTimeUpdate(timeUpdate.toDuration());
setTimeUpdate(timeUpdate == null ? null : timeUpdate.toDuration());
}
/**