Skip to content

NpcSkin

Namespace Mc.Scripting · Kind class (sealed)

public sealed class NpcSkin

The skin of an NPC: a texture (the value and signature of a “textures” profile property), or the skin of a player whose profile id is known.

Member Description
Uuid CopyOf { get; } The profile id whose skin is copied (default when the texture is given).
string? Signature { get; } The texture signature, when there is one.
string Value { get; } The texture value (base64), empty when the skin is copied.
public Uuid CopyOf { get; }

The profile id whose skin is copied (default when the texture is given).

public string? Signature { get; }

The texture signature, when there is one.

public string Value { get; }

The texture value (base64), empty when the skin is copied.

Member Description
static NpcSkin FromTexture(string value, string? signature = null) A skin from a texture property (at most 8192 bytes of value and 1024 of signature).
static NpcSkin OfPlayer(Player player) The skin of a player.
static NpcSkin OfProfile(Uuid profile) The skin of a profile id (an online player’s skin is copied; an offline one gives the default skin).
public static NpcSkin FromTexture(string value, string? signature = null)

A skin from a texture property (at most 8192 bytes of value and 1024 of signature).

Parameters

Name Type Description
value string The base64 texture value.
signature string? = null The signature, if the texture has one.

Returns NpcSkin

public static NpcSkin OfPlayer(Player player)

The skin of a player.

Parameters

Name Type Description
player Player The player.

Returns NpcSkin

public static NpcSkin OfProfile(Uuid profile)

The skin of a profile id (an online player’s skin is copied; an offline one gives the default skin).

Parameters

Name Type Description
profile Uuid The profile id.

Returns NpcSkin

Player · Uuid