mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-11-25 12:25:41 +01:00
Tried to fix potential race condition
This commit is contained in:
parent
f0e5821145
commit
70c5ff4da3
@ -13,6 +13,7 @@ import net.lenni0451.classtransform.utils.loader.InjectionClassLoader;
|
|||||||
import net.lenni0451.reflect.ClassLoaders;
|
import net.lenni0451.reflect.ClassLoaders;
|
||||||
import net.raphimc.netminecraft.constants.MCPipeline;
|
import net.raphimc.netminecraft.constants.MCPipeline;
|
||||||
import net.raphimc.netminecraft.netty.connection.NetServer;
|
import net.raphimc.netminecraft.netty.connection.NetServer;
|
||||||
|
import net.raphimc.vialegacy.util.VersionEnum;
|
||||||
import net.raphimc.viaproxy.cli.ConsoleHandler;
|
import net.raphimc.viaproxy.cli.ConsoleHandler;
|
||||||
import net.raphimc.viaproxy.cli.options.Options;
|
import net.raphimc.viaproxy.cli.options.Options;
|
||||||
import net.raphimc.viaproxy.plugins.PluginManager;
|
import net.raphimc.viaproxy.plugins.PluginManager;
|
||||||
@ -46,6 +47,7 @@ public class ViaProxy {
|
|||||||
Logger.setup();
|
Logger.setup();
|
||||||
ConsoleHandler.hookConsole();
|
ConsoleHandler.hookConsole();
|
||||||
Logger.LOGGER.info("Initializing ViaProxy...");
|
Logger.LOGGER.info("Initializing ViaProxy...");
|
||||||
|
VersionEnum.init();
|
||||||
setNettyParameters();
|
setNettyParameters();
|
||||||
MCPipeline.useOptimizedPipeline();
|
MCPipeline.useOptimizedPipeline();
|
||||||
c2pChannels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
|
c2pChannels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
|
||||||
|
@ -28,8 +28,6 @@ public class Options {
|
|||||||
public static boolean BETACRAFT_AUTH;
|
public static boolean BETACRAFT_AUTH;
|
||||||
|
|
||||||
public static void parse(final String[] args) throws IOException {
|
public static void parse(final String[] args) throws IOException {
|
||||||
VersionEnum.init(); // We need to init the version list already here
|
|
||||||
|
|
||||||
final OptionParser parser = new OptionParser();
|
final OptionParser parser = new OptionParser();
|
||||||
final OptionSpec<Void> help = parser.acceptsAll(asList("help", "h", "?"), "Get a list of all arguments").forHelp();
|
final OptionSpec<Void> help = parser.acceptsAll(asList("help", "h", "?"), "Get a list of all arguments").forHelp();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user