001 package net.minecraft.src; 002 003 import java.io.IOException; 004 import java.net.InetAddress; 005 import net.minecraft.server.MinecraftServer; 006 007 public class DedicatedServerListenThread extends NetworkListenThread 008 { 009 /** Instance of ServerListenThread. */ 010 private final ServerListenThread theServerListenThread; 011 012 public DedicatedServerListenThread(MinecraftServer par1MinecraftServer, InetAddress par2InetAddress, int par3) throws IOException 013 { 014 super(par1MinecraftServer); 015 this.theServerListenThread = new ServerListenThread(this, par2InetAddress, par3); 016 this.theServerListenThread.start(); 017 } 018 019 public void stopListening() 020 { 021 super.stopListening(); 022 this.theServerListenThread.func_71768_b(); 023 this.theServerListenThread.interrupt(); 024 } 025 026 /** 027 * processes packets and pending connections 028 */ 029 public void networkTick() 030 { 031 this.theServerListenThread.processPendingConnections(); 032 super.networkTick(); 033 } 034 035 public DedicatedServer getDedicatedServer() 036 { 037 return (DedicatedServer)super.getServer(); 038 } 039 040 public void func_71761_a(InetAddress par1InetAddress) 041 { 042 this.theServerListenThread.func_71769_a(par1InetAddress); 043 } 044 045 public MinecraftServer getServer() 046 { 047 return this.getDedicatedServer(); 048 } 049 }