mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
Compare commits
6 Commits
v1.2.6+1.2
...
v1.2.6+1.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
f189322e03
|
|||
|
6f441d5d58
|
|||
|
5def32e4b4
|
|||
|
05e421e24c
|
|||
|
9617102600
|
|||
|
0e9ceccc47
|
42
README.md
42
README.md
@@ -6,44 +6,8 @@
|
||||
[](https://modrinth.com/mod/skinrestorer)
|
||||
|
||||
|
||||
SkinRestorer is a **server-side** only mod for Fabric that allows players to use and change skins on servers running in offline/insecure mode.
|
||||
This is a server-side only mod for fabric.
|
||||
|
||||
## 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.
|
||||
It allows you to use and change skins on servers that are in offline/insecure mode.
|
||||
|
||||
## 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
|
||||
```
|
||||
After installation on server use /skin command to change skin.
|
||||
|
||||
@@ -2,6 +2,9 @@ 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
|
||||
@@ -27,7 +30,7 @@ processResources {
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
|
||||
it.options.release.set(21)
|
||||
it.options.release.set(17)
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
@@ -4,8 +4,8 @@ org.gradle.parallel=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/versions.html
|
||||
minecraft_version=1.21
|
||||
yarn_mappings=1.21+build.2
|
||||
minecraft_version=1.20.5
|
||||
yarn_mappings=1.20.5+build.1
|
||||
loader_version=0.15.11
|
||||
|
||||
# Mod Properties
|
||||
|
||||
@@ -7,6 +7,7 @@ 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;
|
||||
@@ -64,7 +65,9 @@ public class SkinRestorer implements DedicatedServerModInitializer {
|
||||
playerManager.sendCommandTree(player);
|
||||
playerManager.sendWorldInfo(player, serverWorld);
|
||||
playerManager.sendPlayerStatus(player);
|
||||
playerManager.sendStatusEffects(player);
|
||||
for (StatusEffectInstance statusEffectInstance : player.getStatusEffects()) {
|
||||
player.networkHandler.sendPacket(new EntityStatusEffectS2CPacket(player.getId(), statusEffectInstance, false));
|
||||
}
|
||||
}
|
||||
|
||||
public static CompletableFuture<Pair<Collection<ServerPlayerEntity>, Collection<GameProfile>>> setSkinAsync(MinecraftServer server, Collection<GameProfile> targets, Supplier<Property> skinSupplier) {
|
||||
|
||||
Reference in New Issue
Block a user