Moved location of ProxyStartEvent

This commit is contained in:
RaphiMC 2023-09-05 18:45:46 +02:00
parent 57342c5491
commit b91723164c
No known key found for this signature in database
GPG key ID: 0F6BB0657A03AC94

View file

@ -169,9 +169,8 @@ public class ViaProxy {
}
try {
Logger.LOGGER.info("Starting proxy server");
PluginManager.EVENT_MANAGER.call(new ProxyStartEvent());
currentProxyServer = new NetServer(() -> PluginManager.EVENT_MANAGER.call(new Client2ProxyHandlerCreationEvent(new Client2ProxyHandler())).getHandler(), Client2ProxyChannelInitializer::new);
PluginManager.EVENT_MANAGER.call(new ProxyStartEvent());
Logger.LOGGER.info("Binding proxy server to " + Options.BIND_ADDRESS + ":" + Options.BIND_PORT);
currentProxyServer.bind(Options.BIND_ADDRESS, Options.BIND_PORT, false);
} catch (Throwable e) {