Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-12-27 08:30:18 +01:00
Remove unneeded check
SessionCommandHandler is only constructed for >= 1.19.3.
Dieser Commit ist enthalten in:
Ursprung
6b03b28a61
Commit
be73131d5d
@ -18,7 +18,6 @@
|
|||||||
package com.velocitypowered.proxy.protocol.packet.chat.session;
|
package com.velocitypowered.proxy.protocol.packet.chat.session;
|
||||||
|
|
||||||
import com.velocitypowered.api.event.command.CommandExecuteEvent;
|
import com.velocitypowered.api.event.command.CommandExecuteEvent;
|
||||||
import com.velocitypowered.api.network.ProtocolVersion;
|
|
||||||
import com.velocitypowered.proxy.VelocityServer;
|
import com.velocitypowered.proxy.VelocityServer;
|
||||||
import com.velocitypowered.proxy.connection.client.ConnectedPlayer;
|
import com.velocitypowered.proxy.connection.client.ConnectedPlayer;
|
||||||
import com.velocitypowered.proxy.protocol.packet.chat.ChatAcknowledgementPacket;
|
import com.velocitypowered.proxy.protocol.packet.chat.ChatAcknowledgementPacket;
|
||||||
@ -55,7 +54,7 @@ public class SessionCommandHandler implements CommandHandler<SessionPlayerComman
|
|||||||
+ "Contact your network administrator."));
|
+ "Contact your network administrator."));
|
||||||
}
|
}
|
||||||
// We seemingly can't actually do this if signed args exist, if not, we can probs keep stuff happy
|
// 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(new ChatAcknowledgementPacket(packet.lastSeenMessages.getOffset()));
|
||||||
}
|
}
|
||||||
return CompletableFuture.completedFuture(null);
|
return CompletableFuture.completedFuture(null);
|
||||||
@ -108,7 +107,7 @@ public class SessionCommandHandler implements CommandHandler<SessionPlayerComman
|
|||||||
.toServer();
|
.toServer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (player.getProtocolVersion().noLessThan(ProtocolVersion.MINECRAFT_1_19_3) && packet.lastSeenMessages != null) {
|
if (packet.lastSeenMessages != null) {
|
||||||
return new ChatAcknowledgementPacket(packet.lastSeenMessages.getOffset());
|
return new ChatAcknowledgementPacket(packet.lastSeenMessages.getOffset());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren