Example #1
0
        public IPlayerListItem FromReader(IMinecraftStreamReader reader)
        {
            HasDisplayName = reader.ReadBool();
            DisplayName    = reader.ReadString();

            return(this);
        }
Example #2
0
        public IPlayerListItem FromReader(IMinecraftStreamReader reader)
        {
            Name       = reader.ReadString();
            Properties = PlayerListActionProperties.FromReader(reader);

            Gamemode       = reader.ReadVarInt();
            Ping           = reader.ReadVarInt();
            HasDisplayName = reader.ReadBool();
            if (HasDisplayName)
            {
                DisplayName = reader.ReadString();
            }

            return(this);
        }
Example #3
0
        public static PlayerListActionProperties FromReader(IMinecraftStreamReader reader)
        {
            var count = reader.ReadVarInt();

            var value = new PlayerListActionProperties();

            for (var i = 0; i < count; i++)
            {
                var property = new Properties();

                property.Name     = reader.ReadString();
                property.Value    = reader.ReadString();
                property.IsSigned = reader.ReadBool();

                if (property.IsSigned)
                {
                    property.Signature = reader.ReadString();
                }

                value[i] = property;
            }

            return(value);
        }