From ec4d24b9a874a773eb11347d6c2704bd49e7e5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9meth=20Noel?= Date: Wed, 30 Jun 2021 22:14:58 +0200 Subject: [PATCH] Add null check --- src/main/java/net/minestom/server/instance/Instance.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/instance/Instance.java b/src/main/java/net/minestom/server/instance/Instance.java index 07f553bda..ec00aa34a 100644 --- a/src/main/java/net/minestom/server/instance/Instance.java +++ b/src/main/java/net/minestom/server/instance/Instance.java @@ -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()); } /**