Replaced ChronoUnit with TimeUnit for consistency

This commit is contained in:
Németh Noel 2021-06-30 13:05:52 +02:00
parent c037ea9d84
commit 01dfe2f48d
1 changed files with 2 additions and 2 deletions

View File

@ -45,6 +45,7 @@ import net.minestom.server.utils.chunk.ChunkUtils;
import net.minestom.server.utils.entity.EntityUtils;
import net.minestom.server.utils.player.PlayerUtils;
import net.minestom.server.utils.time.Cooldown;
import net.minestom.server.utils.time.TimeUnit;
import net.minestom.server.utils.validate.Check;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
@ -52,7 +53,6 @@ import org.jetbrains.annotations.Nullable;
import org.jglrxavpok.hephaistos.nbt.NBTCompound;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalUnit;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
@ -128,7 +128,7 @@ public class Entity implements Viewable, Tickable, EventHandler<EntityEvent>, Da
protected EntityType entityType; // UNSAFE to change, modify at your own risk
// Network synchronization, send the absolute position of the entity each X milliseconds
private static final Duration SYNCHRONIZATION_COOLDOWN = Duration.of(1, ChronoUnit.MINUTES);
private static final Duration SYNCHRONIZATION_COOLDOWN = Duration.of(1, TimeUnit.MINUTE);
private Duration customSynchronizationCooldown;
private long lastAbsoluteSynchronizationTime;