Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 27 lines 726 B view raw
1package net.minecraft.server; 2 3import javax.swing.*; 4import java.util.Vector; 5 6public class PlayerListBox extends JList implements IUpdatePlayerListBox { 7 8 private MinecraftServer a; 9 private int b = 0; 10 11 public PlayerListBox(MinecraftServer minecraftserver) { 12 this.a = minecraftserver; 13 minecraftserver.a((IUpdatePlayerListBox) this); 14 } 15 16 public void a() { 17 if (this.b++ % 20 == 0) { 18 Vector vector = new Vector(); 19 20 for (int i = 0; i < this.a.serverConfigurationManager.players.size(); ++i) { 21 vector.add(((EntityPlayer) this.a.serverConfigurationManager.players.get(i)).name); 22 } 23 24 this.setListData(vector); 25 } 26 } 27}