File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " hive-tools-wrapper" ,
3- "version" : " 5.3 .0" ,
3+ "version" : " 5.5 .0" ,
44 "description" : " Type-safe wrapper for the Hive Bedrock API" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import {
1414 AllTimeStatsProcessors ,
1515 MonthlyStatsProcessors
1616} from "./games/processors" ;
17- import { Player } from "./player/data" ;
17+ import { Player , PlayerSearchResult } from "./player/data" ;
1818import { GameMap } from "./map/data" ;
1919
2020const cachedResponses : {
@@ -360,9 +360,16 @@ export async function getGameMetainfo(
360360 return await fetchData ( `/game/meta/${ game } ` , controller , init ) ;
361361}
362362
363+ export async function searchPlayer (
364+ partial : string ,
365+ controller ?: AbortController ,
366+ init ?: RequestInit
367+ ) : Promise < PlayerSearchResult [ ] > {
368+ return await fetchData ( `/player/search/${ partial } ` , controller , init ) ;
369+ }
370+
363371export * from "./games/data" ;
364372export * from "./games/info" ;
365373export * from "./games/processors" ;
366374export * from "./map/data" ;
367375export * from "./player/data" ;
368-
Original file line number Diff line number Diff line change @@ -83,3 +83,9 @@ export type Player = {
8383 pets : string [ ] ;
8484 mounts : string [ ] ;
8585} ;
86+
87+ export type PlayerSearchResult = {
88+ UUID : string ;
89+ username : string ;
90+ username_cc : string ;
91+ } ;
You can’t perform that action at this time.
0 commit comments