geforkt von Mirrors/Velocity
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
|
@Override
|
||||||
public boolean handle(PluginMessagePacket packet) {
|
public boolean handle(PluginMessagePacket packet) {
|
||||||
VelocityServerConnection serverConn = player.getConnectionInFlight();
|
VelocityServerConnection serverConn = player.getConnectionInFlight();
|
||||||
if (serverConn != null) {
|
if (serverConn != null) {L
|
||||||
if (PluginMessageUtil.isMcBrand(packet)) {
|
if (PluginMessageUtil.isMcBrand(packet)) {
|
||||||
String brand = PluginMessageUtil.readBrandMessage(packet.content());
|
String brand = PluginMessageUtil.readBrandMessage(packet.content());
|
||||||
server.getEventManager().fireAndForget(new PlayerClientBrandEvent(player, brand));
|
server.getEventManager().fireAndForget(new PlayerClientBrandEvent(player, brand));
|
||||||
|
@ -200,7 +200,10 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(SessionPlayerCommandPacket packet) {
|
public boolean handle(SessionPlayerCommandPacket packet) {
|
||||||
player.ensureAndGetCurrentServer();
|
if (player.getCurrentServer().isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!updateTimeKeeper(packet.getTimeStamp())) {
|
if (!updateTimeKeeper(packet.getTimeStamp())) {
|
||||||
return true;
|
return true;
|
||||||
@ -215,7 +218,9 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(SessionPlayerChatPacket packet) {
|
public boolean handle(SessionPlayerChatPacket packet) {
|
||||||
player.ensureAndGetCurrentServer();
|
if (player.getCurrentServer().isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!updateTimeKeeper(packet.getTimestamp())) {
|
if (!updateTimeKeeper(packet.getTimestamp())) {
|
||||||
return true;
|
return true;
|
||||||
@ -230,7 +235,9 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(KeyedPlayerCommandPacket packet) {
|
public boolean handle(KeyedPlayerCommandPacket packet) {
|
||||||
player.ensureAndGetCurrentServer();
|
if (player.getCurrentServer().isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!updateTimeKeeper(packet.getTimestamp())) {
|
if (!updateTimeKeeper(packet.getTimestamp())) {
|
||||||
return true;
|
return true;
|
||||||
@ -245,7 +252,9 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(KeyedPlayerChatPacket packet) {
|
public boolean handle(KeyedPlayerChatPacket packet) {
|
||||||
player.ensureAndGetCurrentServer();
|
if (player.getCurrentServer().isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!updateTimeKeeper(packet.getExpiry())) {
|
if (!updateTimeKeeper(packet.getExpiry())) {
|
||||||
return true;
|
return true;
|
||||||
@ -260,7 +269,10 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handle(LegacyChatPacket packet) {
|
public boolean handle(LegacyChatPacket packet) {
|
||||||
player.ensureAndGetCurrentServer();
|
if (player.getCurrentServer().isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
String msg = packet.getMessage();
|
String msg = packet.getMessage();
|
||||||
if (!validateChat(msg)) {
|
if (!validateChat(msg)) {
|
||||||
return true;
|
return true;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren