1
0
mirror of https://github.com/Suiranoil/SkinRestorer.git synced 2026-01-16 04:42:12 +00:00

Compare commits

..

8 Commits

Author SHA1 Message Date
0c9b4d44cb bump version 2024-06-25 14:55:25 +03:00
2fca98e0f2 better skin refresh 2024-06-25 14:55:25 +03:00
3cba252b5b allow command blocks to execute commands 2024-06-25 14:55:25 +03:00
592cfb6ca4 fix no permission level for clear command targets 2024-06-25 14:55:25 +03:00
Suiranoil
decad54884 Update README.md 2024-06-25 07:57:58 +03:00
3dd75626a1 downgrade version to 1.2.5 2024-06-25 06:46:12 +03:00
d720fc52ef fix missing constructor 2024-06-25 06:44:35 +03:00
b3a618f50b update minecraft to 1.21 2024-06-25 06:42:50 +03:00
4 changed files with 43 additions and 13 deletions

View File

@@ -6,8 +6,44 @@
[![Modrinth Downloads](https://img.shields.io/modrinth/dt/skinrestorer?logo=modrinth)](https://modrinth.com/mod/skinrestorer)
This is a server-side only mod for fabric.
SkinRestorer is a **server-side** only mod for Fabric that allows players to use and change skins on servers running in offline/insecure mode.
It allows you to use and change skins on servers that are in offline/insecure mode.
## Features
- **Set Skins from Mojang Account**: Fetch and apply skins using a valid Minecraft account name.
- **Set Skins from URL**: Apply skins from any image URL, supporting both classic (Steve) and slim (Alex) skin models.
After installation on server use /skin command to change skin.
## Command Usage Guide
### Set Mojang Skin
```
/skin set mojang <skin_name> [<targets>]
```
- **Parameters:**
- `<skin_name>`: Minecraft account name to fetch the skin from.
- `[<targets>]`: (Optional, server operators only) Player(s) to apply the skin to.
### Set Web Skin
```
/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.
### Clear Skin
```
/skin clear [<targets>]
```
- **Parameters:**
- `[<targets>]`: (Optional, server operators only) Player(s) to clear 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 "http://example.com/skin.png"
/skin clear @a
```

View File

@@ -2,9 +2,6 @@ plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
archivesBaseName = project.archives_base_name
version = "${project.mod_version}+${project.minecraft_version}"
group = project.maven_group
@@ -30,7 +27,7 @@ processResources {
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release.set(17)
it.options.release.set(21)
}
java {

View File

@@ -4,8 +4,8 @@ org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/versions.html
minecraft_version=1.20.5
yarn_mappings=1.20.5+build.1
minecraft_version=1.21
yarn_mappings=1.21+build.2
loader_version=0.15.11
# Mod Properties

View File

@@ -7,7 +7,6 @@ import com.mojang.authlib.properties.Property;
import it.unimi.dsi.fastutil.Pair;
import net.fabricmc.api.DedicatedServerModInitializer;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.network.packet.s2c.play.*;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.PlayerManager;
@@ -65,9 +64,7 @@ public class SkinRestorer implements DedicatedServerModInitializer {
playerManager.sendCommandTree(player);
playerManager.sendWorldInfo(player, serverWorld);
playerManager.sendPlayerStatus(player);
for (StatusEffectInstance statusEffectInstance : player.getStatusEffects()) {
player.networkHandler.sendPacket(new EntityStatusEffectS2CPacket(player.getId(), statusEffectInstance, false));
}
playerManager.sendStatusEffects(player);
}
public static CompletableFuture<Pair<Collection<ServerPlayerEntity>, Collection<GameProfile>>> setSkinAsync(MinecraftServer server, Collection<GameProfile> targets, Supplier<Property> skinSupplier) {