This commit is contained in:
parent
3e020337e3
commit
cbb534adf4
@ -13,10 +13,9 @@ npm install mcutils-library
|
||||
Get player:
|
||||
|
||||
```javascript
|
||||
import { getPlayer } from "mcutils-library";
|
||||
import { getPlayer, CachedPlayer } from "mcutils-library";
|
||||
|
||||
const cachedPlayer = await getPlayer(playerId);
|
||||
const { player } = cachedPlayer;
|
||||
|
||||
console.log(player);
|
||||
```
|
||||
@ -24,11 +23,9 @@ console.log(player);
|
||||
Get Server:
|
||||
|
||||
```javascript
|
||||
import { getServer } from "mcutils-library";
|
||||
import JavaMinecraftServer from "mcutils-library/dist/types/server/javaServer";
|
||||
import { getServer, CachedJavaMinecraftServer } from "mcutils-library";
|
||||
|
||||
const cachedServer = await getServer(ServerPlatform.Java, "hypixel.net");
|
||||
const { server } = cachedServer;
|
||||
|
||||
console.log(server);
|
||||
```
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* The base URL for the API.
|
||||
*/
|
||||
export const API_ENDPOINT = "https://api.mcutils.xyz";
|
||||
|
||||
// Methods
|
||||
|
Loading…
Reference in New Issue
Block a user