diff --git a/src/main/java/net/minestom/server/instance/Instance.java b/src/main/java/net/minestom/server/instance/Instance.java index c9921f11e..07f553bda 100644 --- a/src/main/java/net/minestom/server/instance/Instance.java +++ b/src/main/java/net/minestom/server/instance/Instance.java @@ -47,6 +47,7 @@ import org.jetbrains.annotations.Nullable; import org.jglrxavpok.hephaistos.nbt.NBTCompound; import java.time.Duration; +import java.time.temporal.TemporalUnit; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; @@ -1034,7 +1035,7 @@ public abstract class Instance implements BlockModifier, Tickable, TagHandler, P * @param unit in what unit is the time expressed * @param position the location of the block to update */ - public abstract void scheduleUpdate(int time, @NotNull TimeUnit unit, @NotNull BlockPosition position); + public abstract void scheduleUpdate(int time, @NotNull TemporalUnit unit, @NotNull BlockPosition position); /** * Performs a single tick in the instance, including scheduled tasks from {@link #scheduleNextTick(Consumer)}. diff --git a/src/main/java/net/minestom/server/instance/InstanceContainer.java b/src/main/java/net/minestom/server/instance/InstanceContainer.java index d8a7d5fe2..ffc209330 100644 --- a/src/main/java/net/minestom/server/instance/InstanceContainer.java +++ b/src/main/java/net/minestom/server/instance/InstanceContainer.java @@ -24,13 +24,13 @@ import net.minestom.server.utils.callback.OptionalCallback; import net.minestom.server.utils.chunk.ChunkCallback; import net.minestom.server.utils.chunk.ChunkSupplier; import net.minestom.server.utils.chunk.ChunkUtils; -import net.minestom.server.utils.time.TimeUnit; import net.minestom.server.utils.validate.Check; import net.minestom.server.world.DimensionType; import net.minestom.server.world.biomes.Biome; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.time.temporal.TemporalUnit; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; @@ -754,7 +754,7 @@ public class InstanceContainer extends Instance { } @Override - public void scheduleUpdate(int time, @NotNull TimeUnit unit, @NotNull BlockPosition position) { + public void scheduleUpdate(int time, @NotNull TemporalUnit unit, @NotNull BlockPosition position) { final CustomBlock toUpdate = getCustomBlock(position); if (toUpdate == null) { return; diff --git a/src/main/java/net/minestom/server/instance/SharedInstance.java b/src/main/java/net/minestom/server/instance/SharedInstance.java index 19644b480..14a5c9710 100644 --- a/src/main/java/net/minestom/server/instance/SharedInstance.java +++ b/src/main/java/net/minestom/server/instance/SharedInstance.java @@ -6,10 +6,10 @@ import net.minestom.server.storage.StorageLocation; import net.minestom.server.utils.BlockPosition; import net.minestom.server.utils.Position; import net.minestom.server.utils.chunk.ChunkCallback; -import net.minestom.server.utils.time.TimeUnit; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.time.temporal.TemporalUnit; import java.util.Collection; import java.util.UUID; @@ -133,7 +133,7 @@ public class SharedInstance extends Instance { } @Override - public void scheduleUpdate(int time, @NotNull TimeUnit unit, @NotNull BlockPosition position) { + public void scheduleUpdate(int time, @NotNull TemporalUnit unit, @NotNull BlockPosition position) { this.instanceContainer.scheduleUpdate(time, unit, position); }