geforkt von Mirrors/Velocity
Shorten name of DurationUtils#toTicks
Dieser Commit ist enthalten in:
Ursprung
279a3d68ac
Commit
b61321f4f7
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren