make a 1.21.11fabric skinchanger plugin which can change skins of mineecraft players where they can add their skins,or remove or changhe it
Set up a Fabric 1.21.11 client mod with persistent local skin mappings.
Add commands for adding, changing, removing, and listing player skin assignments.
Implement client-side skin texture loading and player-list skin overrides.
Add required metadata, language resources, and configuration assets.
Created the Fabric 1.21.11 project with:
Persistent local skin assignments in
config/local-skin-switcher.jsonAsynchronous image downloading and texture caching
Client-side player skin overrides through a mixin
No server-side installation required
Commands:
/skins add <player> <name> <image-url>/skins change <player> <name> <image-url>/skins use <player> <name>/skins remove <player> <name>/skins list/skins list <player>
Image URLs must use http or https and point directly to a valid skin image.
fix the issue and add INVENTORY GUI features with local skin uploading from computer
Fix the existing skin changer issue and preserve its current command behavior.
Add a client-side inventory-style GUI for managing saved player skins.
Add a local computer-file skin importer with validation, persistence, and texture caching.
Wire the GUI to open in-game and update/remove skin assignments safely.
The current implementation has two practical gaps: it only accepts remote URLs, and the texture loader retries failed sources every render. I’m adding a persistent local-file source format, validating Minecraft skin dimensions, a keybind plus /skins gui, and an inventory-style management screen.
Fixed skin loading reliability:
Added null protection for the skin manager in the mixin.
Prevented repeated failed download attempts every render.
Added validation for 64×32 and 64×64 Minecraft skin dimensions.
Added safer local-file path handling and an 8 MB file limit.
Added local computer skin importing:
Supports PNG files selected through a native file picker.
Copies imported skins into the mod configuration folder.
Persists imported skins across restarts.
Local skins are stored in:
config/local-skin-switcher/skins/
Added inventory-style skin manager GUI:
Open with
/skins gui.Open with the
Kkey.Add URL skins.
Import PNG skins from the computer.
Activate saved skins.
Remove saved skins.
Refresh the current player’s skin list.
Displays active skins and whether a skin is local or URL-based.
Existing commands remain available:
/skins add/skins change/skins use/skins remove/skins list/skins gui
The GUI accepts standard Minecraft skin PNGs only: 64x32 or 64x64.
The compilation failed with this error:
Compilation failed with 44 error(s):
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 8: cannot find symbol
import net.minecraft.client.texture.PlayerSkinTextures;
^
symbol: class PlayerSkinTextures
location: package net.minecraft.client.texture
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 13: cannot find symbol
import java.net.HttpClient;
^
symbol: class HttpClient
location: package java.net
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 14: cannot find symbol
import java.net.HttpRequest;
^
symbol: class HttpRequest
location: package java.net
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 15: cannot find symbol
import java.net.HttpResponse;
^
symbol: class HttpResponse
location: package java.net
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 37: cannot find symbol
private final HttpClient httpClient = HttpClient.newBuilder()
^
symbol: class HttpClient
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 44: cannot find symbol
public PlayerSkinTextures resolve(String playerName, PlayerSkinTextures original) {
^
symbol: class PlayerSkinTextures
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 44: cannot find symbol
public PlayerSkinTextures resolve(String playerName, PlayerSkinTextures original) {
^
symbol: class PlayerSkinTextures
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 5: cannot find symbol
import net.minecraft.client.texture.PlayerSkinTextures;
^
symbol: class PlayerSkinTextures
location: package net.minecraft.client.texture
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 15: cannot find symbol
CallbackInfoReturnable<PlayerSkinTextures> cir
^
symbol: class PlayerSkinTextures
location: class PlayerListEntryMixin
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 37: cannot find symbol
private final HttpClient httpClient = HttpClient.newBuilder()
^
symbol: variable HttpClient
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 56: cannot find symbol
return new PlayerSkinTextures(
^
symbol: class PlayerSkinTextures
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 182: no suitable constructor found for NativeImageBackedTexture(NativeImage)
new NativeImageBackedTexture(image)
^
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 224: cannot find symbol
HttpRequest request = HttpRequest.newBuilder(new URI(url))
^
symbol: class HttpRequest
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 224: cannot find symbol
HttpRequest request = HttpRequest.newBuilder(new URI(url))
^
symbol: variable HttpRequest
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 229: cannot find symbol
HttpResponse<InputStream> response = httpClient.send(
^
symbol: class HttpResponse
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 231: package HttpResponse does not exist
HttpResponse.BodyHandlers.ofInputStream()
^
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinInventoryScreen.java at line 142: cannot find symbol
context.drawBorder(left, top, 340, this.height - 30, 0xFF707070);
^
symbol: method drawBorder(int,int,int,int,int)
location: variable context of type DrawContext
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinInventoryScreen.java at line 164: method does not override or implement a method from a supertype
@Override
^
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinInventoryScreen.java at line 191: method mouseClicked in interface ParentElement cannot be applied to given types;
return super.mouseClicked(mouseX, mouseY, button);
^
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 21: cannot find symbol
PlayerSkinTextures original = cir.getReturnValue();
^
symbol: class PlayerSkinTextures
location: class PlayerListEntryMixin
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 22: cannot find symbol
PlayerSkinTextures replacement = LocalSkinSwitcherClient.getSkinManager().resolve(
^
symbol: class PlayerSkinTextures
location: class PlayerListEntryMixin
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 23: cannot find symbol
entry.getProfile().getName(),
^
symbol: method getName()
location: class GameProfile
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinInventoryScreen.java at line 191: method mouseClicked in interface ParentElement cannot be applied to given types;
return super.mouseClicked(mouseX, mouseY, button);
^
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 182: no suitable constructor found for NativeImageBackedTexture(NativeImage)
new NativeImageBackedTexture(image)
^
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 8: cannot find symbol
import net.minecraft.client.texture.PlayerSkinTextures;
^
symbol: class PlayerSkinTextures
location: package net.minecraft.client.texture
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 13: cannot find symbol
import java.net.HttpClient;
^
symbol: class HttpClient
location: package java.net
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 14: cannot find symbol
import java.net.HttpRequest;
^
symbol: class HttpRequest
location: package java.net
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 15: cannot find symbol
import java.net.HttpResponse;
^
symbol: class HttpResponse
location: package java.net
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 37: cannot find symbol
private final HttpClient httpClient = HttpClient.newBuilder()
^
symbol: class HttpClient
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 44: cannot find symbol
public PlayerSkinTextures resolve(String playerName, PlayerSkinTextures original) {
^
symbol: class PlayerSkinTextures
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 44: cannot find symbol
public PlayerSkinTextures resolve(String playerName, PlayerSkinTextures original) {
^
symbol: class PlayerSkinTextures
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 5: cannot find symbol
import net.minecraft.client.texture.PlayerSkinTextures;
^
symbol: class PlayerSkinTextures
location: package net.minecraft.client.texture
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 15: cannot find symbol
CallbackInfoReturnable<PlayerSkinTextures> cir
^
symbol: class PlayerSkinTextures
location: class PlayerListEntryMixin
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 37: cannot find symbol
private final HttpClient httpClient = HttpClient.newBuilder()
^
symbol: variable HttpClient
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 56: cannot find symbol
return new PlayerSkinTextures(
^
symbol: class PlayerSkinTextures
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 224: cannot find symbol
HttpRequest request = HttpRequest.newBuilder(new URI(url))
^
symbol: class HttpRequest
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 224: cannot find symbol
HttpRequest request = HttpRequest.newBuilder(new URI(url))
^
symbol: variable HttpRequest
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 229: cannot find symbol
HttpResponse<InputStream> response = httpClient.send(
^
symbol: class HttpResponse
location: class SkinManager
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 21: cannot find symbol
PlayerSkinTextures original = cir.getReturnValue();
^
symbol: class PlayerSkinTextures
location: class PlayerListEntryMixin
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 22: cannot find symbol
PlayerSkinTextures replacement = LocalSkinSwitcherClient.getSkinManager().resolve(
^
symbol: class PlayerSkinTextures
location: class PlayerListEntryMixin
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinInventoryScreen.java at line 164: method does not override or implement a method from a supertype
@Override
^
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinInventoryScreen.java at line 142: cannot find symbol
context.drawBorder(left, top, 340, this.height - 30, 0xFF707070);
^
symbol: method drawBorder(int,int,int,int,int)
location: variable context of type DrawContext
ERROR in src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java at line 23: cannot find symbol
entry.getProfile().getName(),
^
symbol: method getName()
location: class GameProfile
ERROR in src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java at line 231: package HttpResponse does not exist
HttpResponse.BodyHandlers.ofInputStream()
^
=== COMPILATION ERROR ANALYSIS ===
MISSING CLASSES:
- PlayerSkinTextures
- HttpClient
- HttpRequest
- HttpResponse
ACTION: Create these classes or check imports
MISSING METHODS:
- drawBorder(int,int,int,int,int)
- getName()
ACTION: Check method names and signatures
FILES TO INVESTIGATE:
- src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java
- src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java
- src/main/java/client/java/com/kodari/skinswitcher/client/SkinInventoryScreen.java
- src/main/java/client/java/com/kodari/skinswitcher/client/SkinInventoryScreen.java
- src/main/java/client/java/com/kodari/skinswitcher/client/SkinManager.java
- src/main/java/client/java/com/kodari/skinswitcher/mixin/PlayerListEntryMixin.java
Please fix this error by creating a new artifact with the corrected code.
Correct the Fabric 1.21.11/Yarn API imports and source-set path issues.
Replace the unsupported HTTP, texture, profile-name, GUI drawing, and mouse APIs.
Patch the affected client classes and mixin with the smallest compatible implementation.
The 1.21.11 Yarn docs show two additional mapping differences from the initial fix: SkinTextures is in net.minecraft.entity.player, and screen input uses mouseClicked(Click, boolean). I’m correcting those against the verified 1.21.11 API, including the new AssetInfo.TextureAsset skin texture representation.Fixed the Fabric 1.21.11 compilation errors.
Changes made:
Replaced
PlayerSkinTextureswith the correct Yarn type:net.minecraft.entity.player.SkinTextures
Updated texture construction to use:
AssetInfo.TextureAssetInfobody(),cape(), andelytra()APIs
Corrected Java HTTP imports:
java.net.http.HttpClientHttpRequestHttpResponse
Updated
NativeImageBackedTextureto the 1.21.11 constructor:NativeImageBackedTexture(Supplier<String>, NativeImage)
Fixed player name access:
entry.getProfile().name()
Replaced removed
DrawContext.drawBorder()with fourfill()calls.Updated GUI input to the 1.21.11 signature:
mouseClicked(Click click, boolean doubled)
Added coordinate extraction through
click.x()andclick.y().Corrected the skin mixin’s
SkinTexturespackage and return type.
The corrected files are:
SkinManager.javaPlayerListEntryMixin.javaSkinInventoryScreen.java
The previous incorrect src/main/java/client/java/... path in the error output should also be corrected in the project source tree: client classes must be under src/client/java/..., as used by these files.
replace the owner by Srish and Name of Plugin by SkinManager+
Update the mod metadata author to
Srish.Rename the displayed plugin/mod name to
SkinManager+.
Updated fabric.mod.json:
Plugin name:
SkinManager+Owner/author:
Srish
its commands skins and INVENTORY GUI isnt working
Fix the skin commands and verify their registration/execution path.
Fix the inventory GUI opening and interaction path.
Recheck metadata/config references affected by the
SkinManager+rename.
The registration paths exist, so I’m making the two failure points more reliable: /skins will open the GUI directly, and GUI opening will always be queued on Minecraft’s client thread. The player list will also refresh as the player name is typed.
Fixed:
/skinsnow opens the inventory GUI directly./skins guicontinues to open it.GUI opening is safely scheduled on the Minecraft client thread.
Skin entries refresh automatically when the player name changes.
Commands are client-side, so use them in-game from the client:
/skins
/skins add PlayerName SkinName https://example.com/skin.png
/skins list
/skins use PlayerName SkinName
/skins remove PlayerName SkinName
Changed files:
SkinCommands.javaLocalSkinSwitcherClient.javaSkinInventoryScreen.java
my game is crashing when im typing /skins
Fixed the /skins crash path by removing the unnecessary queued client-thread call. The GUI now opens directly from the client command executor.
Changed:
src/client/java/com/kodari/skinswitcher/LocalSkinSwitcherClient.java
If it still crashes, send the crash report or latest log from .minecraft/logs/latest.log; the exact exception will identify any remaining issue.
package com.kodari.skinswitcher;
import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class LocalSkinSwitcher implements ModInitializer {
public static final String MOD_ID = "local_skin_switcher";
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
@Override
public void onInitialize() {
}
}