public synchronized void func_77551_a(String p_77551_1_, InetAddress p_77551_2_) { String var3 = ThreadLanServerPing.func_77524_a(p_77551_1_); String var4 = ThreadLanServerPing.func_77523_b(p_77551_1_); if(var4 != null) { var4 = p_77551_2_.getHostAddress() + ":" + var4; boolean var5 = false; Iterator var6 = this.field_77555_b.iterator(); while(var6.hasNext()) { LanServer var7 = (LanServer)var6.next(); if(var7.func_77488_b().equals(var4)) { var7.func_77489_c(); var5 = true; break; } } if(!var5) { this.field_77555_b.add(new LanServer(var3, var4)); this.field_77556_a = true; } } }
/** * On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections. */ public String shareToLAN(EnumGameType par1EnumGameType, boolean par2) { try { String s = this.theServerListeningThread.func_71755_c(); this.getLogAgent().logInfo("Started on " + s); this.isPublic = true; this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), s); this.lanServerPing.start(); this.getConfigurationManager().setGameType(par1EnumGameType); this.getConfigurationManager().setCommandsAllowedForAll(par2); return s; } catch (IOException ioexception) { return null; } }
public synchronized void func_77551_a(String p_77551_1_, InetAddress p_77551_2_) { String s = ThreadLanServerPing.getMotdFromPingResponse(p_77551_1_); String s1 = ThreadLanServerPing.getAdFromPingResponse(p_77551_1_); if (s1 != null) { s1 = p_77551_2_.getHostAddress() + ":" + s1; boolean flag = false; for (LanServerDetector.LanServer lanserverdetector$lanserver : this.listOfLanServers) { if (lanserverdetector$lanserver.getServerIpPort().equals(s1)) { lanserverdetector$lanserver.updateLastSeen(); flag = true; break; } } if (!flag) { this.listOfLanServers.add(new LanServerDetector.LanServer(s, s1)); this.wasUpdated = true; } } }
/** * On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections. */ public String shareToLAN(WorldSettings.GameType type, boolean allowCheats) { try { int i = -1; try { i = HttpUtil.getSuitableLanPort(); } catch (IOException var5) { ; } if (i <= 0) { i = 25564; } this.getNetworkSystem().addLanEndpoint((InetAddress)null, i); logger.info("Started on " + i); this.isPublic = true; this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), i + ""); this.lanServerPing.start(); this.getConfigurationManager().setGameType(type); this.getConfigurationManager().setCommandsAllowedForAll(allowCheats); return i + ""; } catch (IOException var6) { return null; } }
public synchronized void addServer(String pingResponse, InetAddress ipAddress) { String s = ThreadLanServerPing.getMotdFromPingResponse(pingResponse); String s1 = ThreadLanServerPing.getAdFromPingResponse(pingResponse); if (s1 != null) { s1 = ipAddress.getHostAddress() + ":" + s1; boolean flag = false; for (LanServerInfo lanserverinfo : this.listOfLanServers) { if (lanserverinfo.getServerIpPort().equals(s1)) { lanserverinfo.updateLastSeen(); flag = true; break; } } if (!flag) { this.listOfLanServers.add(new LanServerInfo(s, s1)); this.wasUpdated = true; } } }
/** * On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections. */ public String shareToLAN(GameType type, boolean allowCheats) { try { int i = -1; try { i = HttpUtil.getSuitableLanPort(); } catch (IOException var5) { ; } if (i <= 0) { i = 25564; } this.getNetworkSystem().addLanEndpoint((InetAddress)null, i); LOGGER.info("Started on {}", new Object[] {Integer.valueOf(i)}); this.isPublic = true; this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), i + ""); this.lanServerPing.start(); this.getPlayerList().setGameType(type); this.getPlayerList().setCommandsAllowedForAll(allowCheats); this.mc.player.setPermissionLevel(allowCheats ? 4 : 0); return i + ""; } catch (IOException var6) { return null; } }
/** * On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections. */ public String shareToLAN(GameType type, boolean allowCheats) { try { int i = -1; try { i = HttpUtil.getSuitableLanPort(); } catch (IOException var5) { ; } if (i <= 0) { i = 25564; } this.getNetworkSystem().addLanEndpoint((InetAddress)null, i); LOGGER.info("Started on {}", new Object[] {Integer.valueOf(i)}); this.isPublic = true; this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), i + ""); this.lanServerPing.start(); this.getPlayerList().setGameType(type); this.getPlayerList().setCommandsAllowedForAll(allowCheats); this.mc.thePlayer.setPermissionLevel(allowCheats ? 4 : 0); return i + ""; } catch (IOException var6) { return null; } }
public synchronized void func_77551_a(String par1Str, InetAddress par2InetAddress) { String var3 = ThreadLanServerPing.getMotdFromPingResponse(par1Str); String var4 = ThreadLanServerPing.getAdFromPingResponse(par1Str); if (var4 != null) { var4 = par2InetAddress.getHostAddress() + ":" + var4; boolean var5 = false; Iterator var6 = this.listOfLanServers.iterator(); while (var6.hasNext()) { LanServerDetector.LanServer var7 = (LanServerDetector.LanServer)var6.next(); if (var7.getServerIpPort().equals(var4)) { var7.updateLastSeen(); var5 = true; break; } } if (!var5) { this.listOfLanServers.add(new LanServerDetector.LanServer(var3, var4)); this.wasUpdated = true; } } }
/** * On dedicated does nothing. On integrated, sets commandsAllowedForAll, gameType and allows external connections. */ public String shareToLAN(WorldSettings.GameType par1EnumGameType, boolean par2) { try { int var6 = -1; try { var6 = HttpUtil.func_76181_a(); } catch (IOException var5) { ; } if (var6 <= 0) { var6 = 25564; } this.func_147137_ag().addLanEndpoint((InetAddress)null, var6); logger.info("Started on " + var6); this.isPublic = true; this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), var6 + ""); this.lanServerPing.start(); this.getConfigurationManager().setGameType(par1EnumGameType); this.getConfigurationManager().setCommandsAllowedForAll(par2); return var6 + ""; } catch (IOException var61) { return null; } }
public synchronized void func_77551_a(String p_77551_1_, InetAddress p_77551_2_) { String s1 = ThreadLanServerPing.getMotdFromPingResponse(p_77551_1_); String s2 = ThreadLanServerPing.getAdFromPingResponse(p_77551_1_); if (s2 != null) { s2 = p_77551_2_.getHostAddress() + ":" + s2; boolean flag = false; Iterator iterator = this.listOfLanServers.iterator(); while (iterator.hasNext()) { LanServerDetector.LanServer lanserver = (LanServerDetector.LanServer)iterator.next(); if (lanserver.getServerIpPort().equals(s2)) { lanserver.updateLastSeen(); flag = true; break; } } if (!flag) { this.listOfLanServers.add(new LanServerDetector.LanServer(s1, s2)); this.wasUpdated = true; } } }
public String shareToLAN(WorldSettings.GameType p_71206_1_, boolean p_71206_2_) { try { int i = -1; try { i = HttpUtil.func_76181_a(); } catch (IOException ioexception) { ; } if (i <= 0) { i = 25564; } this.func_147137_ag().addLanEndpoint((InetAddress)null, i); logger.info("Started on " + i); this.isPublic = true; this.lanServerPing = new ThreadLanServerPing(this.getMOTD(), i + ""); this.lanServerPing.start(); this.getConfigurationManager().func_152604_a(p_71206_1_); this.getConfigurationManager().setCommandsAllowedForAll(p_71206_2_); return i + ""; } catch (IOException ioexception1) { return null; } }
public String func_71206_a(EnumGameType p_71206_1_, boolean p_71206_2_) { try { String var3 = this.field_71347_n.func_71755_c(); this.func_98033_al().func_98233_a("Started on " + var3); this.field_71346_p = true; this.field_71345_q = new ThreadLanServerPing(this.func_71273_Y(), var3); this.field_71345_q.start(); this.func_71203_ab().func_72357_a(p_71206_1_); this.func_71203_ab().func_72387_b(p_71206_2_); return var3; } catch (IOException var4) { return null; } }