diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java index c97e492c4..f6ed9856b 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java @@ -311,9 +311,9 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player { TitlePacket timesPkt = TitlePacket.timesForProtocolVersion(this.getProtocolVersion()); net.kyori.adventure.title.Title.Times times = title.times(); if (times != null) { - timesPkt.setFadeIn((int) DurationUtils.convertDurationToTicks(times.fadeIn())); - timesPkt.setStay((int) DurationUtils.convertDurationToTicks(times.stay())); - timesPkt.setFadeOut((int) DurationUtils.convertDurationToTicks(times.fadeOut())); + timesPkt.setFadeIn((int) DurationUtils.toTicks(times.fadeIn())); + timesPkt.setStay((int) DurationUtils.toTicks(times.stay())); + timesPkt.setFadeOut((int) DurationUtils.toTicks(times.fadeOut())); } connection.delayedWrite(timesPkt); diff --git a/proxy/src/main/java/com/velocitypowered/proxy/util/DurationUtils.java b/proxy/src/main/java/com/velocitypowered/proxy/util/DurationUtils.java index 4742613e9..a588ed222 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/util/DurationUtils.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/util/DurationUtils.java @@ -18,7 +18,7 @@ public final class DurationUtils { * @param duration the duration to convert into Minecraft ticks * @return the duration represented as the number of Minecraft ticks */ - public static long convertDurationToTicks(Duration duration) { + public static long toTicks(Duration duration) { return duration.toMillis() / ONE_TICK_IN_MILLISECONDS; } }