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.39 " ,
3+ "version" : " 2.0.40 " ,
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 @@ -328,9 +328,9 @@ export class McUtilsAPI {
328328 * @param query the query to search for (eg: aetheria)
329329 * @returns the player search entry or the error (if one occurred)
330330 */
331- async searchPlayers ( query : string ) : Promise < { entry ?: PlayerSearchEntry ; error ?: ErrorResponse } > {
332- const { data, error } = await this . request < PlayerSearchEntry > ( `/players/search ${ this . buildParams ( { query : query } ) } ` ) ;
333- return error ? { error } : { entry : data } ;
331+ async searchPlayers ( query : string ) : Promise < { entries ?: PlayerSearchEntry [ ] ; error ?: ErrorResponse } > {
332+ const { data, error } = await this . request < PlayerSearchEntry [ ] > ( `/players${ this . buildParams ( { query : query } ) } ` ) ;
333+ return error ? { error } : { entries : data } ;
334334 }
335335}
336336
Original file line number Diff line number Diff line change 11import { Skin } from "./skin/skin" ;
22
33export type PlayerSearchEntry = {
4- uuid : string ;
4+ id : string ;
55 username : string ;
66 skin : Skin ;
77}
You can’t perform that action at this time.
0 commit comments