File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " mcutils-js-api" ,
3- "version" : " 2.0.34 " ,
3+ "version" : " 2.0.35 " ,
44 "module" : " dist/index.js" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -133,12 +133,14 @@ export class McUtilsAPI {
133133 * Fetch a player by UUID or username.
134134 *
135135 * @param id the UUID or username of the player (eg: ImFascinated)
136+ * @param fetchOptifineCape whether to fetch the optifine cape (default: true)
136137 * @returns the player or the error (if one occurred)
137138 */
138139 async fetchPlayer (
139- id : string
140+ id : string ,
141+ fetchOptifineCape : boolean = true
140142 ) : Promise < { player ?: Player ; error ?: ErrorResponse } > {
141- const response = await fetch ( `${ this . endpoint } /players/${ id } ` ) ;
143+ const response = await fetch ( `${ this . endpoint } /players/${ id } ${ this . buildParams ( { fetchOptifineCape : String ( fetchOptifineCape ) } ) } ` ) ;
142144 if ( response . ok ) {
143145 return {
144146 player : ( await response . json ( ) ) as Player ,
You can’t perform that action at this time.
0 commit comments