Remove unneeded check

SessionCommandHandler is only constructed for >= 1.19.3.
This commit is contained in:
Gegy 2023-11-27 18:33:35 +01:00 committed by Riley Park
parent 6b03b28a61
commit be73131d5d

View File

@ -18,7 +18,6 @@
package com.velocitypowered.proxy.protocol.packet.chat.session;
import com.velocitypowered.api.event.command.CommandExecuteEvent;
import com.velocitypowered.api.network.ProtocolVersion;
import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.connection.client.ConnectedPlayer;
import com.velocitypowered.proxy.protocol.packet.chat.ChatAcknowledgementPacket;
@ -55,7 +54,7 @@ public class SessionCommandHandler implements CommandHandler<SessionPlayerComman
+ "Contact your network administrator."));
}
// We seemingly can't actually do this if signed args exist, if not, we can probs keep stuff happy
if (player.getProtocolVersion().noLessThan(ProtocolVersion.MINECRAFT_1_19_3) && packet.lastSeenMessages != null) {
if (packet.lastSeenMessages != null) {
return CompletableFuture.completedFuture(new ChatAcknowledgementPacket(packet.lastSeenMessages.getOffset()));
}
return CompletableFuture.completedFuture(null);
@ -108,7 +107,7 @@ public class SessionCommandHandler implements CommandHandler<SessionPlayerComman
.toServer();
}
}
if (player.getProtocolVersion().noLessThan(ProtocolVersion.MINECRAFT_1_19_3) && packet.lastSeenMessages != null) {
if (packet.lastSeenMessages != null) {
return new ChatAcknowledgementPacket(packet.lastSeenMessages.getOffset());
}
return null;