# Templates Skin

### Basic Information

* `name`: This field indicates the name of the item, in this case, "Amethyst".&#x20;
* `displayName`: It's the name displayed for the item in the game. This field supports HEX color format and Minecraft text format.&#x20;
* `material`: Indicates the material of the object in the game. In this case, it's a netherite pickaxe.&#x20;
* `showInMenu`: Determines whether this object should be shown in the skins menu.&#x20;
* `applies-to`: Indicates what type of object this skin applies to.&#x20;
* `permission`: Permissions required to equip the skin on your item.&#x20;
* `custom-model-data`: Uses a number to identify custom item models.&#x20;
* `countdown`: The wait time before the user can equip a skin again.&#x20;
* `currency`: The currency used to purchase the skin.&#x20;
* `preview-skin`: Configuration related to the preview of the object's texture.&#x20;
* `item-physical`: Configuration related to the physical appearance of the item skin.&#x20;
* `actions`: Actions performed when a skin is equipped, removed, or returned.&#x20;
* `gui`: Configuration related to the game's user interface for this object. Defines how the object is displayed in the game menus, both if it's available and if it's not.

***

### Requirements

You will be able to set requirements before applying a skin or removing it, etc.

### Number&#x20;

***

1. `">="` (Greater than or equal to): Checks if the value of the variable is greater than or equal to the value specified in the condition.
2. `">="` (Greater than or equal to): Checks if the value of the variable is greater than or equal to the value specified in the condition.
3. `"<="` (Less than or equal to): Checks if the value of the variable is less than or equal to the value specified in the condition.
4. `"=="` (Equal to): Checks if the value of the variable is equal to the value specified in the condition.
5. `"!="` (Different from): Checks if the value of the variable is different from the value specified in the condition.
6. `">"` (Greater than): Checks whether the value of the variable is greater than the value specified in the condition.
7. `"<"` (Less than): Checks if the value of the variable is less than the value specified in the condition.
8. `"<-"` (Contains): Checks if the variable contains the substring specified in the condition.

### Text

***

1. `"<-"` (Contains): Checks if the variable contains the substring specified in the condition.
2. `"!="` (Different from): Checks if the value of the variable is different from the value specified in the condition.
3. `"="` (equal to): Checks if the value of the variable is equal to the value specified in condition
4. `"|-"` (Starts with): Checks if the variable starts with the substring specified in the condition.
5. `"-|"` (Ends with): Checks if the variable ends with the substring specified in the condition.

### Item Variable:

***

`#lore`  You will be able to get the lore of the item to which you are trying to apply the skin.\
`#displayName`  You will be able to obtain the displayName of the item to which you are trying to apply the skin.

Examples:

```yaml
requirements:
  equipping:
  - '#lore <- Common'
```

```yaml
requirements:
  equipping:
  - '#displayName <- Common'
```

***

### Preview Types:

For each template allows you to configure its preview, this will allow you to place the item at any location on the armature support.

> RIGHT\_ARM\
> LEFT\_ARM\
> HEAD\
> CHEST\
> LEFT\_LEGS\
> RIGHT\_LEGS\
> FEET

#### To generate a template, just leave the Skins folder empty, which you will find in TheItemSkin plugin folder.

```yaml
# This field indicates the name of the item, in this case, "Amethyst".
name: EXAMPLE
# It's the name displayed for the item in the game. This field supports HEX color format and Minecraft text format.
displayName: '&aEXAMPLE'
# Indicates what type of object this skin applies to.
applies-to: Swords
# Determines whether this object should be shown in the skins menu.
showInMenu: true
# Indicates the material of the object in the game. In this case, it's a netherite pickaxe.
material: NETHERITE_SWORD
# Usar cualquier tipo de material (Diamond, Gold, Iron, Stone ...)
all-types-material: false
# rgb colors to configure to leather armor
rgb: 160, 101, 64
# Permissions required to equip the skin on your item.
permission: itemskin.example
# Uses a number to identify custom item models.
custom-model-data: 10000
# Time in seconds before being able to change the item skin again
countdown: 300

#The wait time before the user can equip a skin again.
currency:
  price: 0
  #    VAULT
  #    PLAYER_POINTS
  #    TOKEN_MANAGER
  #    DISABLED
  type: VAULT

# Configuration related to the preview of the object's texture.
# For each template allows you to configure its preview, this will allow you to place the item at any location on the armature support.
#  RIGHT_ARM, LEFT_ARM, HEAD,  CHEST,  LEFT_LEGS,  RIGHT_LEGS,  FEET

preview-skin:
  type: RIGHT_ARM
  duration: 10
  eulerAngle:
    x: 261
    y: 278
    z: 0

# Configuration related to the physical appearance of the item skin.
item-physical:
  require_permission:
    enabled: true
    permission: itemskin.physical.example
    message: '&6&lITEM &8| &cYou need reward.example''s permission to use.'
  material: PAPER
  rgb: 160, 101, 64
  amount: 1
  model_data: 0
  display_name: '&c{displayName} Skin'
  lore:
    - '&8Portable skin'
    - ''
    - '&8 ● &fDrag and drop this Skin to '
    - '&f   any {appliesTo} to apply!'
    - ''
    - '&8 ☀ &fSkin: {displayName}'
    - '&8 ✎ &fRarity: &x&9&F&9&F&9&F&lCOMMON'
    - ''
    - '&8Collectible item ☽'
    - ''
    - '&e▸ Take it and equip it on your item!'
  glowing: false

# Actions performed when a skin is equipped, removed, or returned.
actions:
  equipping:
    - '[sound] BLOCK_NOTE_BLOCK_HARP;1.0f;1.0f'
    - '[message] &aTexture applied successfully to the item.'
  remove:
    - '[sound] BLOCK_NOTE_BLOCK_HARP;1.0f;1.0f'
    - '[message] &aThe texture of your item was removed'
  returnSkin:
    - '[sound] BLOCK_NOTE_BLOCK_HARP;1.0f;1.0f'
    - '[message] &6The skin previously equipped in your item has been returned to you.'

# You will be able to set requirements before applying a skin or removing it, etc.
#  Number
#  ">=" (Greater than or equal to): Checks if the value of the variable is greater than or equal to the value specified in the condition.
#  ">=" (Greater than or equal to): Checks if the value of the variable is greater than or equal to the value specified in the condition.
#  "<=" (Less than or equal to): Checks if the value of the variable is less than or equal to the value specified in the condition.
#  "==" (Equal to): Checks if the value of the variable is equal to the value specified in the condition.
#  "!=" (Different from): Checks if the value of the variable is different from the value specified in the condition.
#  ">" (Greater than): Checks whether the value of the variable is greater than the value specified in the condition.
#  "<" (Less than): Checks if the value of the variable is less than the value specified in the condition.
#  "<-" (Contains): Checks if the variable contains the substring specified in the condition.

#  Text
#  "<-" (Contains): Checks if the variable contains the substring specified in the condition.
#  "!=" (Different from): Checks if the value of the variable is different from the value specified in the condition.
#  "=" (equal to): Checks if the value of the variable is equal to the value specified in condition
#  "|-" (Starts with): Checks if the variable starts with the substring specified in the condition.
#  "-|" (Ends with): Checks if the variable ends with the substring specified in the condition.

#Item Variable:
#  #lore  You will be able to get the lore of the item to which you are trying to apply the skin.
#  #displayName  You will be able to obtain the displayName of the item to which you are trying to apply the skin.

requirements:
  equipping:
    - none
  #  - '#lore <- Common'
  #  - '#displayName <- Common'
  remove:
    - none
  returnSkin:
    - none

# Configuration related to the game's user interface for this object.
#  Defines how the object is displayed in the game menus, both if it's available and if it's not.
gui:
  unavailable:
    material: NETHERITE_SWORD
    rgb: 160, 101, 64
    amount: 1
    model_data: 0
    display_name: '&c{displayName} Skin'
    lore:
      - '&8Unavailable Skin'
      - ''
      - '&8 ● &fUnlock this skin by purchasing it'
      - '&f   on our store or open a crate!'
      - ''
      - '&8 ☀ &fSkin: {displayName}'
      - '&8 ✎ &fRarity: &x&9&F&9&F&9&F&lCOMMON'
      - '&8 ⛏ &fApplies: &f{appliesTo}'
      - ''
      - '&8 ⛁ &fPrice &6{price}'
      - '&8 ■ &fState: &cUnavailable'
      - ''
      - '&e▸ Left-click buy this skin!'
      - '&e▸ Right-click to preview the skin!'
    glowing: false
  available:
    material: NETHERITE_SWORD
    rgb: 160, 101, 64
    amount: 1
    model_data: 0
    display_name: '&a{displayName} Skin'
    lore:
      - '&8Available Skin'
      - ''
      - '&8 ● &fYou have unlocked this skin!'
      - ''
      - '&8 ☀ &fSkin: {displayName}'
      - '&8 ✎ &fRarity: &x&9&F&9&F&9&F&lCOMMON'
      - '&8 ⛏ &fApplies: &f{appliesTo}'
      - ''
      - '&8 ⛏ &fState: &aAvailable'
      - ''
      - '&e▸ Left-click buy this skin!'
      - '&e▸ Right-click to preview the skin!'
    glowing: false

file-version: '1.0.1'
```
