mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-13 13:10:13 +02:00
Send PacketDeclareCommand only when limbo is connected to proxy
This commit is contained in:
parent
e6be30ba29
commit
d49a16ba35
@ -23,6 +23,7 @@ import ru.nanit.limbo.protocol.packets.status.PacketStatusResponse;
|
|||||||
import ru.nanit.limbo.protocol.registry.State;
|
import ru.nanit.limbo.protocol.registry.State;
|
||||||
import ru.nanit.limbo.protocol.registry.Version;
|
import ru.nanit.limbo.protocol.registry.Version;
|
||||||
import ru.nanit.limbo.server.LimboServer;
|
import ru.nanit.limbo.server.LimboServer;
|
||||||
|
import ru.nanit.limbo.server.data.InfoForwarding;
|
||||||
import ru.nanit.limbo.server.data.Title;
|
import ru.nanit.limbo.server.data.Title;
|
||||||
import ru.nanit.limbo.util.Logger;
|
import ru.nanit.limbo.util.Logger;
|
||||||
import ru.nanit.limbo.util.UuidUtil;
|
import ru.nanit.limbo.util.UuidUtil;
|
||||||
@ -405,15 +406,17 @@ public class ClientConnection extends ChannelInboundHandlerAdapter {
|
|||||||
info.setGameMode(server.getConfig().getGameMode());
|
info.setGameMode(server.getConfig().getGameMode());
|
||||||
info.setUuid(uuid);
|
info.setUuid(uuid);
|
||||||
|
|
||||||
PacketDeclareCommands declareCommands = new PacketDeclareCommands();
|
|
||||||
declareCommands.setCommands(Collections.singletonList("limbo"));
|
|
||||||
|
|
||||||
PACKET_LOGIN_SUCCESS = PreEncodedPacket.of(loginSuccess);
|
PACKET_LOGIN_SUCCESS = PreEncodedPacket.of(loginSuccess);
|
||||||
PACKET_JOIN_GAME = PreEncodedPacket.of(joinGame);
|
PACKET_JOIN_GAME = PreEncodedPacket.of(joinGame);
|
||||||
PACKET_PLAYER_ABILITIES = PreEncodedPacket.of(playerAbilities);
|
PACKET_PLAYER_ABILITIES = PreEncodedPacket.of(playerAbilities);
|
||||||
PACKET_PLAYER_POS = PreEncodedPacket.of(positionAndLook);
|
PACKET_PLAYER_POS = PreEncodedPacket.of(positionAndLook);
|
||||||
PACKET_PLAYER_INFO = PreEncodedPacket.of(info);
|
PACKET_PLAYER_INFO = PreEncodedPacket.of(info);
|
||||||
PACKET_DECLARE_COMMANDS = PreEncodedPacket.of(declareCommands);
|
|
||||||
|
if (!server.getConfig().getInfoForwarding().isNone()){// or server.getConfig().getInfoForwarding().getType() != InfoForwarding.Type.NONE
|
||||||
|
PacketDeclareCommands declareCommands = new PacketDeclareCommands();
|
||||||
|
declareCommands.setCommands(Collections.emptyList());
|
||||||
|
PACKET_DECLARE_COMMANDS = PreEncodedPacket.of(declareCommands);
|
||||||
|
}
|
||||||
|
|
||||||
if (server.getConfig().isUseBrandName()){
|
if (server.getConfig().isUseBrandName()){
|
||||||
PacketPluginMessage pluginMessage = new PacketPluginMessage();
|
PacketPluginMessage pluginMessage = new PacketPluginMessage();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user