JaveNotifyClientTranslator: Translate invalid bed message (#1212)

This isn't sent as its own message but as a specific event.
This commit is contained in:
Camotoy 2020-09-02 00:36:53 -04:00 committed by GitHub
parent 7c4868cada
commit d717085c6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -43,6 +43,7 @@ import org.geysermc.connector.network.session.GeyserSession;
import org.geysermc.connector.network.translators.PacketTranslator;
import org.geysermc.connector.network.translators.Translator;
import org.geysermc.connector.network.translators.inventory.PlayerInventoryTranslator;
import org.geysermc.connector.utils.LocaleUtils;
@Translator(packet = ServerNotifyClientPacket.class)
public class JavaNotifyClientTranslator extends PacketTranslator<ServerNotifyClientPacket> {
@ -141,6 +142,11 @@ public class JavaNotifyClientTranslator extends PacketTranslator<ServerNotifyCli
packet.getValue() == RespawnScreenValue.IMMEDIATE_RESPAWN));
session.sendUpstreamPacket(gamerulePacket);
break;
case INVALID_BED:
// Not sent as a proper message? Odd.
session.sendMessage(LocaleUtils.getLocaleString("block.minecraft.spawn.not_valid",
session.getClientData().getLanguageCode()));
break;
default:
break;
}