mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
Merge branch 'refs/heads/1.21-multiloader' into 1.20.5-multiloader
This commit is contained in:
11
CHANGELOG.md
11
CHANGELOG.md
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.1.0] - 2024-09-26
|
||||
### Added
|
||||
- Added `config reload` command for dynamic configuration updates
|
||||
- Added `refreshSkinOnJoin` config option (see [wiki](https://github.com/Suiranoil/SkinRestorer/wiki/Configuration#refreshskinonjoin))
|
||||
- Implemented caching for skin providers
|
||||
- Added provider configurations (see [wiki](https://github.com/Suiranoil/SkinRestorer/wiki/Configuration#providers))
|
||||
- Added username and url validation for requests
|
||||
### Fixed
|
||||
- Fixed old skin directory migration not working
|
||||
- Prevented overwriting existing skin files during migration
|
||||
|
||||
## [2.0.3] - 2024-08-20
|
||||
### Added
|
||||
- Added `firstJoinSkinProvider` config option (see [wiki](https://github.com/Suiranoil/SkinRestorer/wiki/Config#firstjoinskinprovider))
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
### Added
|
||||
- Added `firstJoinSkinProvider` config option (see [wiki](https://github.com/Suiranoil/SkinRestorer/wiki/Config#firstjoinskinprovider))
|
||||
- Added `config reload` command for dynamic configuration updates
|
||||
- Added `refreshSkinOnJoin` config option (see [wiki](https://github.com/Suiranoil/SkinRestorer/wiki/Configuration#refreshskinonjoin))
|
||||
- Implemented caching for skin providers
|
||||
- Added provider configurations (see [wiki](https://github.com/Suiranoil/SkinRestorer/wiki/Configuration#providers))
|
||||
- Added username and url validation for requests
|
||||
### Fixed
|
||||
- Fixed ability to set config values to `null`
|
||||
- Fixed old skin directory migration not working
|
||||
- Prevented overwriting existing skin files during migration
|
||||
|
||||
93
README.md
93
README.md
@@ -1,7 +1,7 @@
|
||||
# SkinRestorer
|
||||
|
||||
<a href="https://www.curseforge.com/minecraft/mc-mods/skinrestorer"><img src="https://raw.githubusercontent.com/Suiranoil/badges/main/assets/minecraft/platform/curseforge/mini/badge.svg" alt="CurseForge" height="32"></a>
|
||||
<a href="https://modrinth.com/mod/skinrestorer"><img src="https://raw.githubusercontent.com/Suiranoil/badges/main/assets/minecraft/platform/modrinth/mini/badge.svg" alt="Modrinth" height="32"></a>
|
||||
<a href="https://www.curseforge.com/minecraft/mc-mods/skinrestorer"><img src="https://raw.githubusercontent.com/Suiranoil/badges/main/assets/minecraft/platform/curseforge/mini/badge.svg" alt="CurseForge" height="32"></a>
|
||||
|
||||
A server-side mod for managing and restoring player skins.
|
||||
|
||||
@@ -10,94 +10,25 @@ A server-side mod for managing and restoring player skins.
|
||||
- **Set skins from Mojang Account**: Fetch and apply skins using a valid Minecraft username.
|
||||
- **Set skins from Ely.by**: Fetch and apply skins using a valid [Ely.by](https://ely.by/) username.
|
||||
- **Set skins from URL**: Fetch and apply skins from any image URL, supporting both classic (Steve) and slim (Alex) skin models.
|
||||
- **Automatic skin fetching**: Automatically fetch skin from Mojang/Ely.by when a player joins the server running in offline/insecure mode ([configurable](https://github.com/Suiranoil/SkinRestorer/wiki/Config)).
|
||||
- **Automatic skin fetching**: Automatically fetch skin from Mojang/Ely.by when a player joins the server running in offline/insecure mode ([configurable](https://github.com/Suiranoil/SkinRestorer/wiki/Configuration)).
|
||||
- **Singleplayer support**: Apply skins individually for each world.
|
||||
- **Permissions API support**
|
||||
|
||||
## 📜 Command Usage Guide
|
||||
|
||||
### Set Mojang skin
|
||||
For a detailed list of available commands and their usage, please visit the [commands wiki page](https://github.com/Suiranoil/SkinRestorer/wiki/Commands).
|
||||
|
||||
Fetch and apply skins using a valid Minecraft username.
|
||||
## ❌ Known Incompatibilities
|
||||
|
||||
```
|
||||
/skin set mojang <username> [<targets>]
|
||||
```
|
||||
- **[Arclight](https://github.com/IzzelAliz/Arclight) (<=1.20.1)**: Trials or older versions are not compatible due to mixin conflicts.
|
||||
As an alternative, consider using the [SkinsRestorer](https://www.spigotmc.org/resources/skinsrestorer.2124/) plugin.
|
||||
|
||||
- **Parameters**
|
||||
- `<username>`: Minecraft username to fetch the skin from.
|
||||
- `[<targets>]`: (Optional, server operators only) Player(s) to apply the skin to.
|
||||
## 🪙 Donation
|
||||
|
||||
### Set Ely.by skin
|
||||
If you enjoy using **SkinRestorer** and would like to support its development, you can contribute through cryptocurrency donations.
|
||||
|
||||
Fetch and apply skins using a valid [Ely.by](https://ely.by/) username.
|
||||
Bitcoin (BTC): `1Ndbwny8pxdnWXFgadp95fp97y5JqMJKTX`\
|
||||
USDT (TRC20): `TGXn8wrqku5KLzwPWQAeH7wgnV4UzwHEae`\
|
||||
USDT (TON): `UQAQF18Xlmx-V1oZ90C2YOju5qI7q1LgrCP5QaIUhqIELmDS`
|
||||
|
||||
```
|
||||
/skin set ely.by <username> [<targets>]
|
||||
```
|
||||
|
||||
- **Parameters**
|
||||
- `<username>`: Ely.by username to fetch the skin from.
|
||||
- `[<targets>]`: (Optional, server operators only) Player(s) to apply the skin to.
|
||||
|
||||
### Set Web skin
|
||||
|
||||
Fetch and apply skins from any image URL, supporting both classic (Steve) and slim (Alex) skin models.
|
||||
|
||||
Uses [mineskin api](https://mineskin.org/) under the hood.
|
||||
|
||||
```
|
||||
/skin set web (classic|slim) "<url>" [<targets>]
|
||||
```
|
||||
|
||||
- **Parameters**
|
||||
- `(classic|slim)`: Type of the skin model (`classic` for Steve model, `slim` for Alex model).
|
||||
- `"<url>"`: URL pointing to the skin image file (ensure it follows Minecraft's skin size and format requirements).
|
||||
- `[<targets>]`: (Optional, server operators only) Player(s) to apply the skin to.
|
||||
|
||||
### Refresh skin
|
||||
|
||||
Refetch and reapply the currently applied skins.
|
||||
|
||||
```
|
||||
/skin refresh [<targets>]
|
||||
```
|
||||
|
||||
- **Parameters**
|
||||
- `[<targets>]`: (Optional, server operators only) Player(s) to refresh the skin for.
|
||||
|
||||
### Clear skin
|
||||
|
||||
Remove the currently applied skins.
|
||||
|
||||
```
|
||||
/skin clear [<targets>]
|
||||
```
|
||||
|
||||
- **Parameters**
|
||||
- `[<targets>]`: (Optional, server operators only) Player(s) to clear the skin for.
|
||||
|
||||
### Reset skin
|
||||
|
||||
Reset to the default skin or remove any custom skin.
|
||||
|
||||
If [automatic skin fetching](https://github.com/Suiranoil/SkinRestorer/wiki/Config#fetchskinonfirstjoin) is enabled, a new skin will be fetched when the player rejoins the server.
|
||||
|
||||
```
|
||||
/skin reset [<targets>]
|
||||
```
|
||||
|
||||
- **Parameters**
|
||||
- `[<targets>]`: (Optional, server operators only) Player(s) to reset the skin for.
|
||||
|
||||
### Notes
|
||||
|
||||
- If `targets` is not specified, the command will apply to the player executing the command.
|
||||
|
||||
### Examples
|
||||
|
||||
```
|
||||
/skin set mojang Notch
|
||||
/skin set web classic "https://example.com/skin.png"
|
||||
/skin clear @a
|
||||
```
|
||||
Thank you for your generosity!
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.Optional;
|
||||
@@ -71,7 +72,7 @@ public final class SkinRestorer {
|
||||
var isDefaultName = config.name().equals(defaultName);
|
||||
SkinRestorer.providersRegistry.register(defaultName, provider, config.enabled() && isDefaultName);
|
||||
|
||||
if (!isDefaultName)
|
||||
if (!isDefaultName && Arrays.stream(SkinProvider.BUILTIN_PROVIDER_NAMES).noneMatch(name -> name.equals(config.name())))
|
||||
SkinRestorer.providersRegistry.register(config.name(), provider, config.enabled());
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ public final class SkinCommand {
|
||||
var providers = SkinRestorer.getProvidersRegistry().getPublicProviders();
|
||||
for (var entry : providers)
|
||||
set.then(buildSetSubcommand(entry.first(), entry.second()));
|
||||
if (!providers.isEmpty())
|
||||
base.then(set);
|
||||
|
||||
base.then(
|
||||
|
||||
@@ -14,7 +14,7 @@ public final class Config {
|
||||
|
||||
private String language = "en_us";
|
||||
|
||||
private boolean refreshSkinOnJoin = false;
|
||||
private boolean refreshSkinOnJoin = true;
|
||||
|
||||
private boolean fetchSkinOnFirstJoin = true;
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ public interface SkinProvider {
|
||||
ElyBySkinProvider ELY_BY = new ElyBySkinProvider();
|
||||
MineskinSkinProvider MINESKIN = new MineskinSkinProvider();
|
||||
|
||||
String[] BUILTIN_PROVIDER_NAMES = new String[]{EmptySkinProvider.PROVIDER_NAME, MojangSkinProvider.PROVIDER_NAME, ElyBySkinProvider.PROVIDER_NAME, MineskinSkinProvider.PROVIDER_NAME};
|
||||
|
||||
String getArgumentName();
|
||||
|
||||
boolean hasVariantSupport();
|
||||
|
||||
@@ -8,9 +8,9 @@ minecraft_version_list=1.20.5,1.20.6
|
||||
minecraft_version_range=[1.20.5,1.20.6]
|
||||
mod_id=skinrestorer
|
||||
mod_name=SkinRestorer
|
||||
mod_version=2.0.3
|
||||
mod_version=2.1.0
|
||||
mod_author=Lionarius
|
||||
mod_homepage=https://www.curseforge.com/minecraft/mc-mods/skinrestorer
|
||||
mod_homepage=https://modrinth.com/mod/skinrestorer
|
||||
mod_sources=https://github.com/Suiranoil/SkinRestorer
|
||||
mod_issues=https://github.com/Suiranoil/SkinRestorer/issues
|
||||
license=MIT
|
||||
|
||||
Reference in New Issue
Block a user