mcutils-js-api 2.0.13 → 2.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -102,7 +102,7 @@ export declare class McUtilsAPI {
102
102
  * @param id the UUID or username of the player (eg: ImFascinated)
103
103
  * @returns the skin PNG image or the error (if one occurred)
104
104
  */
105
- fetchPlayerSkin(id: string): Promise<{
105
+ fetchPlayerSkinTexture(id: string): Promise<{
106
106
  image?: ArrayBuffer;
107
107
  error?: ErrorResponse;
108
108
  }>;
@@ -115,7 +115,7 @@ export declare class McUtilsAPI {
115
115
  * @param overlays whether to render skin overlay layers (default: true)
116
116
  * @returns the skin part PNG image or the error (if one occurred)
117
117
  */
118
- fetchPlayerSkinPart(id: string, part: string, size?: number, overlays?: boolean): Promise<{
118
+ fetchPlayerSkin(id: string, part: string, size?: number, overlays?: boolean): Promise<{
119
119
  image?: ArrayBuffer;
120
120
  error?: ErrorResponse;
121
121
  }>;
@@ -125,7 +125,7 @@ export declare class McUtilsAPI {
125
125
  * @param id the cape texture id (eg: from player.cape or a texture hash)
126
126
  * @returns the cape PNG image or the error (if one occurred)
127
127
  */
128
- fetchPlayerCape(id: string): Promise<{
128
+ fetchPlayerCapeTexture(id: string): Promise<{
129
129
  image?: ArrayBuffer;
130
130
  error?: ErrorResponse;
131
131
  }>;
package/dist/index.js CHANGED
@@ -149,7 +149,7 @@ export class McUtilsAPI {
149
149
  * @param id the UUID or username of the player (eg: ImFascinated)
150
150
  * @returns the skin PNG image or the error (if one occurred)
151
151
  */
152
- async fetchPlayerSkin(id) {
152
+ async fetchPlayerSkinTexture(id) {
153
153
  const response = await fetch(`${this.endpoint}/skin/${id}/texture.png`);
154
154
  if (response.ok) {
155
155
  return { image: await response.arrayBuffer() };
@@ -167,7 +167,7 @@ export class McUtilsAPI {
167
167
  * @param overlays whether to render skin overlay layers (default: true)
168
168
  * @returns the skin part PNG image or the error (if one occurred)
169
169
  */
170
- async fetchPlayerSkinPart(id, part, size = 768, overlays = true) {
170
+ async fetchPlayerSkin(id, part, size = 768, overlays = true) {
171
171
  const response = await fetch(`${this.endpoint}/skin/${id}/${part}.png${this.buildParams({ size: String(size), overlays: String(overlays) })}`);
172
172
  if (response.ok) {
173
173
  return { image: await response.arrayBuffer() };
@@ -182,7 +182,7 @@ export class McUtilsAPI {
182
182
  * @param id the cape texture id (eg: from player.cape or a texture hash)
183
183
  * @returns the cape PNG image or the error (if one occurred)
184
184
  */
185
- async fetchPlayerCape(id) {
185
+ async fetchPlayerCapeTexture(id) {
186
186
  const response = await fetch(`${this.endpoint}/cape/${id}/texture.png`);
187
187
  if (response.ok) {
188
188
  return { image: await response.arrayBuffer() };
@@ -16,7 +16,6 @@ export type ServerMotd = {
16
16
  clean: string[];
17
17
  html: string[];
18
18
  preview: string;
19
- htmlPreview: string;
20
19
  };
21
20
  export type ServerPlayerSampleName = {
22
21
  raw: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcutils-js-api",
3
- "version": "2.0.13",
3
+ "version": "2.0.15",
4
4
  "module": "dist/index.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",