NpcSkin
Namespace Mc.Scripting · Kind class (sealed)
public sealed class NpcSkinThe 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.
Properties
Section titled “Properties”| 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. |
CopyOf
Section titled “CopyOf”public Uuid CopyOf { get; }The profile id whose skin is copied (default when the texture is given).
Signature
Section titled “Signature”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.
Methods
Section titled “Methods”| 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). |
FromTexture
Section titled “FromTexture”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
OfPlayer
Section titled “OfPlayer”public static NpcSkin OfPlayer(Player player)The skin of a player.
Parameters
| Name | Type | Description |
|---|---|---|
player |
Player |
The player. |
Returns NpcSkin
OfProfile
Section titled “OfProfile”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