3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2025-01-11 15:41:14 +01:00

Remove System.out.println() stuff

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-07-25 20:33:33 -04:00
Ursprung 034039a27d
Commit dc540ae776
6 geänderte Dateien mit 0 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -23,14 +23,12 @@ public class LoginSessionHandler implements MinecraftSessionHandler {
}
if (packet instanceof SetCompression) {
System.out.println("Enabling compression on server connection, this is inefficient!");
SetCompression sc = (SetCompression) packet;
connection.getChannel().setCompressionThreshold(sc.getThreshold());
}
if (packet instanceof ServerLoginSuccess) {
// the player has been logged on.
System.out.println("Player connected to remote server");
connection.getChannel().setState(StateRegistry.PLAY);
connection.getProxyPlayer().setConnectedServer(connection);
connection.getProxyPlayer().getConnection().setSessionHandler(new com.velocitypowered.proxy.connection.client.PlaySessionHandler(connection.getProxyPlayer()));

Datei anzeigen

@ -21,7 +21,6 @@ public class PlaySessionHandler implements MinecraftSessionHandler {
if (packet instanceof Ping) {
// Make sure to reply back to the server so it doesn't think we're gone.
connection.getChannel().write(packet);
connection.getProxyPlayer().getConnection().write(packet);
} else if (packet instanceof Disconnect) {
// The server wants to disconnect us. TODO fallback handling
Disconnect original = (Disconnect) packet;

Datei anzeigen

@ -36,7 +36,6 @@ public class StatusSessionHandler implements MinecraftSessionHandler {
}
// Status request
System.out.println("Got status request!");
ServerPing ping = new ServerPing(
new ServerPing.Version(340, "1.12.2"),
new ServerPing.Players(0, 0),

Datei anzeigen

@ -24,7 +24,6 @@ public class LegacyPingEncoder extends MessageToByteEncoder<LegacyPingResponse>
String serializedResponse = serialize(msg);
out.writeShort(serializedResponse.length());
out.writeBytes(serializedResponse.getBytes(StandardCharsets.UTF_16BE));
System.out.println(ByteBufUtil.prettyHexDump(out));
}
private String serialize(LegacyPingResponse response) {

Datei anzeigen

@ -40,7 +40,6 @@ public class MinecraftDecoder extends MessageToMessageDecoder<ByteBuf> {
throw new CorruptedFrameException("Error decoding " + packet.getClass() + " Direction " + direction
+ " Protocol " + protocolVersion + " State " + state + " ID " + Integer.toHexString(packetId), e);
}
System.out.println("IN: " + packet);
out.add(new PacketWrapper(packet, slice));
}
}

Datei anzeigen

@ -25,7 +25,6 @@ public class MinecraftEncoder extends MessageToByteEncoder<MinecraftPacket> {
int packetId = mappings.getId(msg);
ProtocolUtils.writeVarInt(out, packetId);
msg.encode(out, direction, protocolVersion);
System.out.println("OUT: " + msg);
}
public int getProtocolVersion() {