Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Connections -> HandlerNames
Dieser Commit ist enthalten in:
Ursprung
0294cfda56
Commit
ba7ba70f4b
@ -1,13 +1,13 @@
|
||||
package com.velocitypowered.proxy.connection;
|
||||
|
||||
import static com.velocitypowered.proxy.network.Connections.CIPHER_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.CIPHER_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.COMPRESSION_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.COMPRESSION_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.CIPHER_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.CIPHER_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.COMPRESSION_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.COMPRESSION_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.FRAME_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.FRAME_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.MINECRAFT_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.MINECRAFT_ENCODER;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.velocitypowered.api.network.ProtocolVersion;
|
||||
@ -31,7 +31,6 @@ import com.velocitypowered.proxy.network.pipeline.MinecraftEncoder;
|
||||
import com.velocitypowered.proxy.util.except.QuietDecoderException;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelFutureListener;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||
@ -48,7 +47,6 @@ import javax.crypto.spec.SecretKeySpec;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* A utility class to make working with the pipeline a little less painful and transparently handles
|
||||
|
@ -2,7 +2,7 @@ package com.velocitypowered.proxy.connection.backend;
|
||||
|
||||
import static com.velocitypowered.proxy.VelocityServer.GENERAL_GSON;
|
||||
import static com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeConstants.HANDSHAKE_HOSTNAME_TOKEN;
|
||||
import static com.velocitypowered.proxy.network.Connections.HANDLER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.HANDLER;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.velocitypowered.proxy.network;
|
||||
|
||||
import static com.velocitypowered.proxy.network.Connections.FLOW_HANDLER;
|
||||
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.READ_TIMEOUT;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.FLOW_HANDLER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.FRAME_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.FRAME_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.MINECRAFT_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.MINECRAFT_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.READ_TIMEOUT;
|
||||
|
||||
import com.velocitypowered.proxy.VelocityServer;
|
||||
import com.velocitypowered.proxy.network.packet.PacketDirection;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.velocitypowered.proxy.network;
|
||||
|
||||
public class Connections {
|
||||
public class HandlerNames {
|
||||
|
||||
public static final String CIPHER_DECODER = "cipher-decoder";
|
||||
public static final String CIPHER_ENCODER = "cipher-encoder";
|
||||
@ -16,7 +16,7 @@ public class Connections {
|
||||
public static final String MINECRAFT_ENCODER = "minecraft-encoder";
|
||||
public static final String READ_TIMEOUT = "read-timeout";
|
||||
|
||||
private Connections() {
|
||||
private HandlerNames() {
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
@ -1,12 +1,12 @@
|
||||
package com.velocitypowered.proxy.network;
|
||||
|
||||
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.LEGACY_PING_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.LEGACY_PING_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.READ_TIMEOUT;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.FRAME_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.FRAME_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.LEGACY_PING_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.LEGACY_PING_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.MINECRAFT_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.MINECRAFT_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.READ_TIMEOUT;
|
||||
|
||||
import com.velocitypowered.proxy.VelocityServer;
|
||||
import com.velocitypowered.proxy.connection.MinecraftConnection;
|
||||
@ -48,7 +48,7 @@ public class ServerChannelInitializer extends ChannelInitializer<Channel> {
|
||||
|
||||
final MinecraftConnection connection = new MinecraftConnection(ch, this.server);
|
||||
connection.setSessionHandler(new HandshakeSessionHandler(connection, this.server));
|
||||
ch.pipeline().addLast(Connections.HANDLER, connection);
|
||||
ch.pipeline().addLast(HandlerNames.HANDLER, connection);
|
||||
|
||||
if (this.server.getConfiguration().isProxyProtocol()) {
|
||||
ch.pipeline().addFirst(new HAProxyMessageDecoder());
|
||||
|
@ -1,11 +1,11 @@
|
||||
package com.velocitypowered.proxy.server;
|
||||
|
||||
import static com.velocitypowered.proxy.network.Connections.FRAME_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.FRAME_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.HANDLER;
|
||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_DECODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.MINECRAFT_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.Connections.READ_TIMEOUT;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.FRAME_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.FRAME_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.HANDLER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.MINECRAFT_DECODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.MINECRAFT_ENCODER;
|
||||
import static com.velocitypowered.proxy.network.HandlerNames.READ_TIMEOUT;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren