mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-09 10:01:52 +01:00
Fixed import error
This commit is contained in:
parent
038782a60d
commit
14d2ad1f36
@ -35,6 +35,7 @@ import net.raphimc.viaproxy.cli.options.Options;
|
|||||||
import net.raphimc.viaproxy.plugins.PluginManager;
|
import net.raphimc.viaproxy.plugins.PluginManager;
|
||||||
import net.raphimc.viaproxy.plugins.events.Proxy2ServerChannelInitializeEvent;
|
import net.raphimc.viaproxy.plugins.events.Proxy2ServerChannelInitializeEvent;
|
||||||
import net.raphimc.viaproxy.plugins.events.types.ITyped;
|
import net.raphimc.viaproxy.plugins.events.types.ITyped;
|
||||||
|
import net.raphimc.viaproxy.protocolhack.impl.ViaProxyVPHPipeline;
|
||||||
import net.raphimc.viaproxy.proxy.session.ProxyConnection;
|
import net.raphimc.viaproxy.proxy.session.ProxyConnection;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
@ -69,7 +70,7 @@ public class Proxy2ServerChannelInitializer extends MinecraftChannelInitializer
|
|||||||
|
|
||||||
super.initChannel(channel);
|
super.initChannel(channel);
|
||||||
channel.attr(MCPipeline.PACKET_REGISTRY_ATTRIBUTE_KEY).set(PacketRegistryUtil.getHandshakeRegistry(true));
|
channel.attr(MCPipeline.PACKET_REGISTRY_ATTRIBUTE_KEY).set(PacketRegistryUtil.getHandshakeRegistry(true));
|
||||||
channel.pipeline().addLast(new ViaProxyVPHPipeline(user, ProxyConnection.fromChannel(channel).getServerVersion()));
|
channel.pipeline().addLast(new ViaProxyVPHPipeline(user, proxyConnection.getServerVersion()));
|
||||||
|
|
||||||
if (PluginManager.EVENT_MANAGER.call(new Proxy2ServerChannelInitializeEvent(ITyped.Type.POST, channel)).isCancelled()) {
|
if (PluginManager.EVENT_MANAGER.call(new Proxy2ServerChannelInitializeEvent(ITyped.Type.POST, channel)).isCancelled()) {
|
||||||
channel.close();
|
channel.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user