3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-25 15:50:19 +01:00

Handle duplicates from server pings gracefully

Dieser Commit ist enthalten in:
Andrew Steinborn 2020-06-23 23:03:19 -04:00
Ursprung fd231c71fd
Commit 780e1c8be5
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -62,7 +62,7 @@ public final class CommandExecuteEvent implements ResultedEvent<CommandResult> {
/** /**
* Represents the result of the {@link CommandExecuteEvent}. * Represents the result of the {@link CommandExecuteEvent}.
*/ */
public static final class CommandResult implements Result { public static final class CommandResult implements ResultedEvent.Result {
private static final CommandResult ALLOWED = new CommandResult(true, false,null); private static final CommandResult ALLOWED = new CommandResult(true, false,null);
private static final CommandResult DENIED = new CommandResult(false, false,null); private static final CommandResult DENIED = new CommandResult(false, false,null);

Datei anzeigen

@ -17,6 +17,7 @@ import com.velocitypowered.natives.encryption.VelocityCipherFactory;
import com.velocitypowered.natives.util.Natives; import com.velocitypowered.natives.util.Natives;
import com.velocitypowered.proxy.VelocityServer; import com.velocitypowered.proxy.VelocityServer;
import com.velocitypowered.proxy.connection.client.InitialInboundConnection; import com.velocitypowered.proxy.connection.client.InitialInboundConnection;
import com.velocitypowered.proxy.connection.client.StatusSessionHandler;
import com.velocitypowered.proxy.protocol.MinecraftPacket; import com.velocitypowered.proxy.protocol.MinecraftPacket;
import com.velocitypowered.proxy.protocol.StateRegistry; import com.velocitypowered.proxy.protocol.StateRegistry;
import com.velocitypowered.proxy.protocol.netty.MinecraftCipherDecoder; import com.velocitypowered.proxy.protocol.netty.MinecraftCipherDecoder;
@ -92,7 +93,8 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter {
sessionHandler.disconnected(); sessionHandler.disconnected();
} }
if (association != null && !knownDisconnect) { if (association != null && !knownDisconnect
&& !(sessionHandler instanceof StatusSessionHandler)) {
logger.info("{} has disconnected", association); logger.info("{} has disconnected", association);
} }
} }