Flip ?: null checks

This commit is contained in:
Németh Noel 2021-06-30 22:25:24 +02:00
parent ec4d24b9a8
commit 059565b397
2 changed files with 2 additions and 2 deletions

View File

@ -1615,7 +1615,7 @@ public class Entity implements Viewable, Tickable, EventHandler<EntityEvent>, Da
@SuppressWarnings("removal")
@Deprecated(forRemoval = true)
public void setCustomSynchronizationCooldown(@Nullable net.minestom.server.utils.time.UpdateOption cooldown) {
setCustomSynchronizationCooldown(cooldown == null ? null : Duration.ofMillis(cooldown.toMilliseconds()));
setCustomSynchronizationCooldown(cooldown != null ? Duration.ofMillis(cooldown.toMilliseconds()) : null);
}
/**

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 == null ? null : timeUpdate.toDuration());
setTimeUpdate(timeUpdate != null ? timeUpdate.toDuration() : null);
}
/**