Fix NPE when a TitlePacket of type TIMES is sent (#1944)

References: https://github.com/bundabrg/GeyserReversion/issues/29

Co-authored-by: bundabrg <bundabrg@grieve.com.au>
This commit is contained in:
bundabrg 2021-02-17 13:58:08 +08:00 committed by GitHub
parent fc712ea892
commit 15027c222e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,6 +71,7 @@ public class JavaTitleTranslator extends PacketTranslator<ServerTitlePacket> {
titlePacket.setFadeInTime(packet.getFadeIn()); titlePacket.setFadeInTime(packet.getFadeIn());
titlePacket.setFadeOutTime(packet.getFadeOut()); titlePacket.setFadeOutTime(packet.getFadeOut());
titlePacket.setStayTime(packet.getStay()); titlePacket.setStayTime(packet.getStay());
titlePacket.setText("");
break; break;
} }