Fixed import error

This commit is contained in:
RaphiMC 2023-04-05 16:04:44 +02:00
parent 038782a60d
commit 14d2ad1f36

View File

@ -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();