This commit is contained in:
FarmVivi 2024-07-22 18:25:04 +00:00 committed by GitHub
commit e509fe14d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -187,7 +187,12 @@ public enum VelocityForgeBackendConnectionPhase implements BackendConnectionPhas
public boolean handle(VelocityServerConnection server, ConnectedPlayer player, PluginMessagePacket message) {
if (message.getChannel().equals("ambassador:commands")) {
AvailableCommandsPacket packet = new AvailableCommandsPacket();
packet.decode(message.content(), ProtocolUtils.Direction.CLIENTBOUND,server.getConnection().getProtocolVersion());
try {
packet.decode(message.content(), ProtocolUtils.Direction.CLIENTBOUND, server.getConnection().getProtocolVersion());
} catch (Exception e) {
Ambassador.getInstance().logger.error("Failed to decode AvailableCommandsPacket", e);
return true;
}
server.getConnection().getActiveSessionHandler().handle(packet);
return true;
}