001package net.minecraft.client.mco;
002
003import cpw.mods.fml.relauncher.Side;
004import cpw.mods.fml.relauncher.SideOnly;
005import java.io.IOException;
006import java.util.ArrayList;
007import java.util.Collections;
008import java.util.List;
009import java.util.Timer;
010import net.minecraft.util.Session;
011
012@SideOnly(Side.CLIENT)
013public class McoServerList
014{
015    private volatile boolean field_98259_a = false;
016    private TimerTaskMcoServerListUpdate field_98257_b;
017    private Timer field_98258_c = new Timer();
018    private List field_98255_d = new ArrayList();
019    private boolean field_98256_e = false;
020    private Session field_98254_f;
021
022    public McoServerList(Session par1Session)
023    {
024        this.field_98254_f = par1Session;
025        this.field_98257_b = new TimerTaskMcoServerListUpdate(this, (McoServerListINNER1)null);
026        this.field_98258_c.schedule(this.field_98257_b, 0L, 10000L);
027    }
028
029    public synchronized boolean func_98251_a()
030    {
031        return this.field_98256_e;
032    }
033
034    public synchronized void func_98250_b()
035    {
036        this.field_98256_e = false;
037    }
038
039    public synchronized List func_98252_c()
040    {
041        return Collections.unmodifiableList(this.field_98255_d);
042    }
043
044    private synchronized void func_96426_a(List par1List)
045    {
046        if (!par1List.equals(this.field_98255_d))
047        {
048            this.field_98255_d = par1List;
049            this.field_98256_e = true;
050        }
051    }
052
053    public synchronized void func_98248_d()
054    {
055        this.field_98259_a = true;
056        this.field_98257_b.cancel();
057        this.field_98258_c.cancel();
058    }
059
060    static Session func_100014_a(McoServerList par0McoServerList)
061    {
062        return par0McoServerList.field_98254_f;
063    }
064
065    static boolean func_98249_b(McoServerList par0McoServerList)
066    {
067        return par0McoServerList.field_98259_a;
068    }
069
070    static void func_98247_a(McoServerList par0McoServerList, List par1List) throws IOException
071    {
072        par0McoServerList.func_96426_a(par1List);
073    }
074}