Update UpstreamPacketHandler.java (#1570)

Changed the logging in message to display in the Action Bar instead of spamming the chat.
This commit is contained in:
Carbuino 2020-11-24 09:14:02 -07:00 committed by GitHub
parent 896638ed84
commit 894275b8c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -187,7 +187,13 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
@Override @Override
public boolean handle(MovePlayerPacket packet) { public boolean handle(MovePlayerPacket packet) {
if (session.isLoggingIn()) { if (session.isLoggingIn()) {
session.sendMessage(LanguageUtils.getPlayerLocaleString("geyser.auth.login.wait", session.getLocale())); SetTitlePacket titlePacket = new SetTitlePacket();
titlePacket.setType(SetTitlePacket.Type.ACTIONBAR);
titlePacket.setText(LanguageUtils.getPlayerLocaleString("geyser.auth.login.wait", session.getLocale()));
titlePacket.setFadeInTime(0);
titlePacket.setFadeOutTime(1);
titlePacket.setStayTime(2);
session.sendUpstreamPacket(titlePacket);
} }
return translateAndDefault(packet); return translateAndDefault(packet);