mirror of
https://github.com/Suiranoil/SkinRestorer.git
synced 2026-01-16 04:42:12 +00:00
port 1.21.11
This commit is contained in:
@@ -8,7 +8,7 @@ dependencies {
|
||||
minecraft "com.mojang:minecraft:${minecraft_version}"
|
||||
mappings loom.layered {
|
||||
officialMojangMappings()
|
||||
parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip")
|
||||
// parchment("org.parchmentmc.data:parchment-${parchment_minecraft}:${parchment_version}@zip")
|
||||
}
|
||||
compileOnly group: 'org.spongepowered', name: 'mixin', version: '0.8.5'
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.lionarius.skinrestorer.skin.provider.*;
|
||||
import net.lionarius.skinrestorer.translation.Translation;
|
||||
import net.lionarius.skinrestorer.util.*;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.level.storage.LevelResource;
|
||||
@@ -70,8 +70,8 @@ public final class SkinRestorer {
|
||||
return Optional.ofNullable(SkinRestorer.providersRegistry.get(name));
|
||||
}
|
||||
|
||||
public static ResourceLocation resourceLocation(String name) {
|
||||
return ResourceLocation.fromNamespaceAndPath(SkinRestorer.MOD_ID, name);
|
||||
public static Identifier resourceLocation(String name) {
|
||||
return Identifier.fromNamespaceAndPath(SkinRestorer.MOD_ID, name);
|
||||
}
|
||||
|
||||
public static String assetPath(String name) {
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.lionarius.skinrestorer.skin.provider.SkinProviderContext;
|
||||
import net.lionarius.skinrestorer.translation.Translation;
|
||||
import net.lionarius.skinrestorer.util.PlayerUtils;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
import net.minecraft.commands.arguments.GameProfileArgument;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.players.NameAndId;
|
||||
@@ -55,7 +56,7 @@ public final class SkinCommand {
|
||||
|
||||
base.then(
|
||||
literal("config")
|
||||
.requires(commandSourceStack -> commandSourceStack.hasPermission(4))
|
||||
.requires(commandSourceStack -> Commands.LEVEL_OWNERS.check(commandSourceStack.permissions()))
|
||||
.then(literal("reload").executes(SkinCommand::configReloadSubcommand))
|
||||
);
|
||||
|
||||
@@ -269,7 +270,7 @@ public final class SkinCommand {
|
||||
BiFunction<CommandContext<CommandSourceStack>, Collection<NameAndId>, Integer> consumer
|
||||
) {
|
||||
return argument("targets", GameProfileArgument.gameProfile())
|
||||
.requires(source -> source.hasPermission(2))
|
||||
.requires(source -> Commands.LEVEL_GAMEMASTERS.check(source.permissions()))
|
||||
.executes(context -> consumer.apply(context, GameProfileArgument.getGameProfiles(context, "targets")));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.lionarius.skinrestorer.platform.Services;
|
||||
import net.lionarius.skinrestorer.skin.SkinValue;
|
||||
import net.lionarius.skinrestorer.skin.provider.SkinShuffleSkinProvider;
|
||||
import net.lionarius.skinrestorer.util.PlayerUtils;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
|
||||
@@ -23,8 +23,8 @@ public class SkinShuffleCompatibility {
|
||||
return SkinShuffleCompatibility.SHOULD_APPLY;
|
||||
}
|
||||
|
||||
public static ResourceLocation resourceLocation(String name) {
|
||||
return ResourceLocation.fromNamespaceAndPath(SkinShuffleCompatibility.MOD_ID, name);
|
||||
public static Identifier resourceLocation(String name) {
|
||||
return Identifier.fromNamespaceAndPath(SkinShuffleCompatibility.MOD_ID, name);
|
||||
}
|
||||
|
||||
public static void onPlayerJoin(ServerPlayer player) {
|
||||
|
||||
Reference in New Issue
Block a user