public MinecraftServer(OptionSet options, Proxy proxy) { // CraftBukkit - signature file -> OptionSet this.X = new UserCache(this, a); j = this; this.d = proxy; // this.universe = file1; // CraftBukkit this.p = new ServerConnection(this); this.o = new CommandDispatcher(); // this.convertable = new WorldLoaderServer(file1); // CraftBukkit - moved to DedicatedServer.init this.T = new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString()); this.U = this.T.createMinecraftSessionService(); this.W = this.T.createProfileRepository(); // CraftBukkit start this.options = options; // Try to see if we're actually running in a terminal, disable jline if not if (System.console() == null) { System.setProperty("jline.terminal", "jline.UnsupportedTerminal"); org.bukkit.craftbukkit.Main.useJline = false; } try { this.reader = new ConsoleReader(System.in, System.out); this.reader.setExpandEvents(false); // Avoid parsing exceptions for uncommonly used event designators } catch (Throwable e) { try { // Try again with jline disabled for Windows users without C++ 2008 Redistributable System.setProperty("jline.terminal", "jline.UnsupportedTerminal"); System.setProperty("user.language", "en"); org.bukkit.craftbukkit.Main.useJline = false; this.reader = new ConsoleReader(System.in, System.out); this.reader.setExpandEvents(false); } catch (IOException ex) { i.warn((String) null, ex); } } Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this)); primaryThread = new ThreadServerApplication(this, "Server thread"); // Moved from main }
public MinecraftServer(OptionSet options, Proxy proxy) { // CraftBukkit - signature file -> OptionSet net.minecraft.util.io.netty.util.ResourceLeakDetector.setEnabled( false ); // Spigot - disable this.X = new UserCache(this, a); j = this; this.d = proxy; // this.universe = file1; // CraftBukkit // this.p = new ServerConnection(this); // Spigot this.o = new CommandDispatcher(); // this.convertable = new WorldLoaderServer(file1); // CraftBukkit - moved to DedicatedServer.init this.T = new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString()); this.U = this.T.createMinecraftSessionService(); this.W = this.T.createProfileRepository(); // CraftBukkit start this.options = options; // Try to see if we're actually running in a terminal, disable jline if not if (System.console() == null) { System.setProperty("jline.terminal", "jline.UnsupportedTerminal"); org.bukkit.craftbukkit.Main.useJline = false; } try { this.reader = new ConsoleReader(System.in, System.out); this.reader.setExpandEvents(false); // Avoid parsing exceptions for uncommonly used event designators } catch (Throwable e) { try { // Try again with jline disabled for Windows users without C++ 2008 Redistributable System.setProperty("jline.terminal", "jline.UnsupportedTerminal"); System.setProperty("user.language", "en"); org.bukkit.craftbukkit.Main.useJline = false; this.reader = new ConsoleReader(System.in, System.out); this.reader.setExpandEvents(false); } catch (IOException ex) { i.warn((String) null, ex); } } Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this)); primaryThread = new ThreadServerApplication(this, "Server thread"); // Moved from main }