https://github.com/richienb/minecraft-player
Minecraft player information.
https://github.com/richienb/minecraft-player
Last synced: 4 months ago
JSON representation
Minecraft player information.
- Host: GitHub
- URL: https://github.com/richienb/minecraft-player
- Owner: Richienb
- License: mit
- Created: 2020-06-12T04:21:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-08T10:43:44.000Z (over 5 years ago)
- Last Synced: 2024-12-17T19:38:22.422Z (about 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# minecraft-player [](https://travis-ci.com/Richienb/minecraft-player)
Minecraft player information.
[](https://npmjs.com/package/minecraft-player)
## Install
```sh
npm install minecraft-player
```
## Usage
```js
const minecraftPlayer = require("minecraft-player");
(async () => {
const { uuid } = await minecraftPlayer("Notch");
console.log(uuid);
//=> "c7da90d5-6a05-4217-b94a-7d427cbbcad8"
})();
```
## API
### minecraftPlayer(player)
#### player
Type: `string`
Username or UUID of the player.
### Player data
#### uuid
Type: `string`
The player's UUID.
#### username
Type: `string`
The player's username.
#### usernameHistory
Type: `array of objects`
The player's username history in order from oldest to newest.
##### username
Type: `string`
The player's username.
##### changedAt
*Doesn't exist for the oldest username.*
Type: `string`
A timestamp of when the skin was set.
#### textures
Type: `object`
The player's skin information.
##### custom
Type: `boolean`
Whether the player has set a custom skin.
##### slim
Type: `boolean`
Whether the skin is using the slim (Alex) model.
##### skin.url
Type: `string`
A url which resolves as the player's skin.
##### skin.data
Type: `string`
The player's skin as a base64 encoded png.
#### createdAt
Type: `string`
A timestamp of when the player was created.