> For the complete documentation index, see [llms.txt](https://edseries-plugins.gitbook.io/p/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edseries-plugins.gitbook.io/p/edcosmetics/modules/skin-effects.md).

# Skin Effects

Module `skin-effects`. Animated skins that everyone sees with no client mods: enchanted glint, rainbow, void, hologram, aurora, inferno, frost, galaxy, molten, midas, toxic, storm, shadow, prism, heartbeat, halloween, mirage, plus the shape effects levitate (hovering) and jelly (wobbling), and any two of them combined. Players pick them as **SKIN** cosmetics (`categories/skins.yml`, 16 by default).

## How it works

1. The plugin takes the player's own skin, writes a few hidden marker pixels into a corner the game never draws, and has the result signed by Mojang through [MineSkin](https://mineskin.org).
2. The signed skin is put on the player live, then cached: rejoining with the same skin and effect is instant.
3. The resource pack's entity shader reads the markers and draws the effect, for everyone, in F5 and in the inventory preview.

Anyone whose own skin carries markers without a preset has them removed (`clean-unauthorized-markers`), so nobody can fake an effect. Logins are never held up by it.

## Setup

1. Make a free account at [mineskin.org](https://mineskin.org), create an API key (Account → API keys).
2. Put it in `plugins/EdCosmetics/skin-effects/config.yml` → `mineskin.api-key`. Never share it.
3. `/edcosmetics reload`.

## Presets (`skin-effects/config.yml`)

```yaml
presets:
  enchanted:
    effect: { type: enchanted, speed: 90, intensity: 220 }
    color: '#B070FF'
  void:
    effect: { type: void, speed: 60, intensity: 230 }
    second-effect: { type: glitch, speed: 140, intensity: 120 }
    color: '#8A5CFF'
    glow: true             # full-bright
    # hurt-color: '#FF3030'  colour of the hurt flash
    # key-color: '#FF00FF'   only pixels of exactly this colour get the effect
```

`speed` and `intensity` go from 0 to 255. A SKIN cosmetic names a preset:

```yaml
type: SKIN
cosmetics:
  enchanted:
    name: '&dEnchanted'
    material: ENCHANTED_BOOK
    preset: enchanted
```

## Cooldown

A skin change re-sends the player to everyone around them and may sign a new skin, so players wait `config.yml` → `skin-effects.toggle-cooldown-seconds` (default 5, `0` = no wait) between changes. Losing access is never held back. Skins never change within `refresh.combat-delay-seconds` (10) of a fight.

## Commands (`edcosmetics.skinfx.admin`)

| Command                               |                                                       |
| ------------------------------------- | ----------------------------------------------------- |
| `/skinfx reload`                      | reload `skin-effects/config.yml` and messages         |
| `/skinfx status`                      | tracked players, cache, MineSkin queue and rate limit |
| `/skinfx presets`                     | list presets                                          |
| `/skinfx set <player> <preset\|none>` | set a player's preset (until their cosmetics change)  |
| `/skinfx refresh <player>`            | work out and re-apply a player's skin                 |

## Limits

* While an effect is on, the player's Mojang / OptiFine cape is hidden (a signed skin carries no cape); `cape-notice` tells them once.
* Changing effect respawns the player's own view for a moment (the only way a client reloads its skin).
* The MineSkin free plan signs about 20 skins a minute. Each skin + preset pair is signed only once; skins are queued and signed one at a time at the pace MineSkin allows, and rate limits or outages are retried (`retry-minutes`).
* Clients 1.21.6 to 26.3+ see the effects. Iris / OptiFine shader packs show normal skins.
* Bedrock players have no Java skin and are skipped.
