001    package net.minecraft.src;
002    
003    import cpw.mods.fml.common.Side;
004    import cpw.mods.fml.common.asm.SideOnly;
005    import net.minecraft.server.MinecraftServer;
006    
007    @SideOnly(Side.CLIENT)
008    public class IntegratedPlayerList extends ServerConfigurationManager
009    {
010        private NBTTagCompound tagsForLastWrittenPlayer = null;
011    
012        public IntegratedPlayerList(IntegratedServer par1IntegratedServer)
013        {
014            super(par1IntegratedServer);
015            this.viewDistance = 10;
016        }
017    
018        /**
019         * also stores the NBTTags if this is an intergratedPlayerList
020         */
021        protected void writePlayerData(EntityPlayerMP par1EntityPlayerMP)
022        {
023            if (par1EntityPlayerMP.getCommandSenderName().equals(this.getIntegratedServer().getServerOwner()))
024            {
025                this.tagsForLastWrittenPlayer = new NBTTagCompound();
026                par1EntityPlayerMP.writeToNBT(this.tagsForLastWrittenPlayer);
027            }
028    
029            super.writePlayerData(par1EntityPlayerMP);
030        }
031    
032        /**
033         * get the associated Integrated Server
034         */
035        public IntegratedServer getIntegratedServer()
036        {
037            return (IntegratedServer)super.getServerInstance();
038        }
039    
040        /**
041         * gets the tags created in the last writePlayerData call
042         */
043        public NBTTagCompound getTagsFromLastWrite()
044        {
045            return this.tagsForLastWrittenPlayer;
046        }
047    
048        public MinecraftServer getServerInstance()
049        {
050            return this.getIntegratedServer();
051        }
052    }