32 lines
546 B
Markdown
32 lines
546 B
Markdown
# Minecraft Utilities - Javascript Library
|
|
|
|
The JavaScript library for the Minecraft Utilities API.
|
|
|
|
## Usage
|
|
|
|
Install the package using npm:
|
|
|
|
```bash
|
|
npm install mcutils-library
|
|
```
|
|
|
|
Get player:
|
|
|
|
```javascript
|
|
import { getPlayer, CachedPlayer } from "mcutils-library";
|
|
|
|
const cachedPlayer = await getPlayer(playerId);
|
|
|
|
console.log(player);
|
|
```
|
|
|
|
Get Server:
|
|
|
|
```javascript
|
|
import { getServer, CachedJavaMinecraftServer } from "mcutils-library";
|
|
|
|
const cachedServer = await getServer(ServerPlatform.Java, "hypixel.net");
|
|
|
|
console.log(server);
|
|
```
|