13
0
geforkt von Mirrors/Velocity

Merge pull request #358 from FrankHeijden/fix/adventure-title

Fix kyori adventure title
Dieser Commit ist enthalten in:
Andrew Steinborn 2020-08-19 16:07:05 -04:00 committet von GitHub
Commit b2000652ca
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -308,9 +308,12 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
connection.delayedWrite(titlePkt);
TitlePacket timesPkt = TitlePacket.timesForProtocolVersion(this.getProtocolVersion());
timesPkt.setFadeIn((int) DurationUtils.convertDurationToTicks(title.fadeInTime()));
timesPkt.setStay((int) DurationUtils.convertDurationToTicks(title.stayTime()));
timesPkt.setFadeOut((int) DurationUtils.convertDurationToTicks(title.fadeOutTime()));
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()));
}
connection.delayedWrite(timesPkt);
connection.flush();