Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Downgrade severity of handling several incoming user input packet states
Dieser Commit ist enthalten in:
Ursprung
953ab6d8e7
Commit
f6fbd25805
@ -116,7 +116,7 @@ public class ClientConfigSessionHandler implements MinecraftSessionHandler {
|
||||
@Override
|
||||
public boolean handle(PluginMessagePacket packet) {
|
||||
VelocityServerConnection serverConn = player.getConnectionInFlight();
|
||||
if (serverConn != null) {
|
||||
if (serverConn != null) {L
|
||||
if (PluginMessageUtil.isMcBrand(packet)) {
|
||||
String brand = PluginMessageUtil.readBrandMessage(packet.content());
|
||||
server.getEventManager().fireAndForget(new PlayerClientBrandEvent(player, brand));
|
||||
|
@ -200,7 +200,10 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
||||
|
||||
@Override
|
||||
public boolean handle(SessionPlayerCommandPacket packet) {
|
||||
player.ensureAndGetCurrentServer();
|
||||
if (player.getCurrentServer().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (!updateTimeKeeper(packet.getTimeStamp())) {
|
||||
return true;
|
||||
@ -215,7 +218,9 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
||||
|
||||
@Override
|
||||
public boolean handle(SessionPlayerChatPacket packet) {
|
||||
player.ensureAndGetCurrentServer();
|
||||
if (player.getCurrentServer().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!updateTimeKeeper(packet.getTimestamp())) {
|
||||
return true;
|
||||
@ -230,7 +235,9 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
||||
|
||||
@Override
|
||||
public boolean handle(KeyedPlayerCommandPacket packet) {
|
||||
player.ensureAndGetCurrentServer();
|
||||
if (player.getCurrentServer().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!updateTimeKeeper(packet.getTimestamp())) {
|
||||
return true;
|
||||
@ -245,7 +252,9 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
||||
|
||||
@Override
|
||||
public boolean handle(KeyedPlayerChatPacket packet) {
|
||||
player.ensureAndGetCurrentServer();
|
||||
if (player.getCurrentServer().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!updateTimeKeeper(packet.getExpiry())) {
|
||||
return true;
|
||||
@ -260,7 +269,10 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
||||
|
||||
@Override
|
||||
public boolean handle(LegacyChatPacket packet) {
|
||||
player.ensureAndGetCurrentServer();
|
||||
if (player.getCurrentServer().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
String msg = packet.getMessage();
|
||||
if (!validateChat(msg)) {
|
||||
return true;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren