diff --git a/SpigotCore/SpigotCore_21/build.gradle.kts b/SpigotCore/SpigotCore_21/build.gradle.kts index e8440e00..a05a08fa 100644 --- a/SpigotCore/SpigotCore_21/build.gradle.kts +++ b/SpigotCore/SpigotCore_21/build.gradle.kts @@ -37,6 +37,7 @@ dependencies { compileOnly(libs.paperapi21) compileOnly(libs.nms21) + compileOnly(libs.authlib2) compileOnly(libs.datafixer) compileOnly(libs.netty) compileOnly(libs.authlib) diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/ProtocolWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/ProtocolWrapper21.java index 2186e32b..47709d76 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/core/ProtocolWrapper21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/ProtocolWrapper21.java @@ -25,6 +25,9 @@ import de.steamwar.Reflection; import net.minecraft.Util; import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket; import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket; +import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.GameType; import org.bukkit.GameMode; @@ -34,33 +37,19 @@ import java.util.List; import java.util.function.LongSupplier; public class ProtocolWrapper21 implements ProtocolWrapper { - - private static final Reflection.Field equipmentStack = Reflection.getField(equipmentPacket, List.class, 0); @Override public void setEquipmentPacketStack(Object packet, Object slot, Object stack) { - equipmentStack.set(packet, Collections.singletonList(new Pair<>(slot, stack))); + ClientboundSetEquipmentPacket setEquipmentPacket = (ClientboundSetEquipmentPacket) packet; + setEquipmentPacket.getSlots().add(Pair.of((EquipmentSlot) slot, (ItemStack) stack)); } - private static final Reflection.Constructor removePacketConstructor = Reflection.getConstructor(ClientboundPlayerInfoRemovePacket.class, List.class); - @Override - @SuppressWarnings("deprecation") public Object playerInfoPacketConstructor(PlayerInfoAction action, GameProfile profile, GameMode mode) { if(action == PlayerInfoAction.REMOVE) - return removePacketConstructor.invoke(Collections.singletonList(profile.getId())); - return switch (action) { - case ADD -> new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE), new ClientboundPlayerInfoUpdatePacket.Entry( - profile.getId(), profile, true, 0, GameType.byId(mode.getValue()), null, true, 0, null - )); - case GAMEMODE -> new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE), new ClientboundPlayerInfoUpdatePacket.Entry( - profile.getId(), profile, true, 0, GameType.byId(mode.getValue()), null, true, 0, null - )); - default -> null; - }; - } + return new ClientboundPlayerInfoRemovePacket(Collections.singletonList(profile.getId())); - @Override - public void initTPSWarp(LongSupplier longSupplier) { - Util.timeSource = () -> System.nanoTime() + longSupplier.getAsLong(); + return new ClientboundPlayerInfoUpdatePacket(action == PlayerInfoAction.ADD ? + EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE) : EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE), + Collections.singletonList(new ClientboundPlayerInfoUpdatePacket.Entry(profile.getId(), profile, false, 0, GameType.byId(mode.getValue()), null, false, 0, null))); } } diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyTrialsWrapper21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyTrialsWrapper21.java index a0800dac..562c7058 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyTrialsWrapper21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/TrickyTrialsWrapper21.java @@ -19,6 +19,7 @@ package de.steamwar.core; +import com.mojang.authlib.properties.Property; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.EntityType; @@ -40,4 +41,9 @@ public class TrickyTrialsWrapper21 implements TrickyTrialsWrapper { public Material getTurtleScute() { return Material.TURTLE_SCUTE; } + + @Override + public String getValue(Property property) { + return property.value(); + } } diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/core/authlib/SteamwarGameProfileRepository21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/core/authlib/SteamwarGameProfileRepository21.java new file mode 100644 index 00000000..21df7d4c --- /dev/null +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/core/authlib/SteamwarGameProfileRepository21.java @@ -0,0 +1,73 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.core.authlib; + +import com.mojang.authlib.GameProfile; +import com.mojang.authlib.GameProfileRepository; +import com.mojang.authlib.ProfileLookupCallback; +import de.steamwar.Reflection; +import de.steamwar.sql.SteamwarUser; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.Services; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + +public class SteamwarGameProfileRepository21 extends SteamwarGameProfileRepository { + private static final GameProfileRepository fallback; + private static final Reflection.Field field; + private static final Services current; + + static { + Class clazz = MinecraftServer.getServer().getClass(); + field = Reflection.getField(clazz, Services.class, 0); + current = field.get(MinecraftServer.getServer()); + fallback = current.profileRepository(); + } + + @Override + public void findProfilesByNames(String[] strings, ProfileLookupCallback profileLookupCallback) { + List unknownNames = new ArrayList<>(); + for (String name:strings) { + SteamwarUser user = SteamwarUser.get(name); + if(user == null) { + unknownNames.add(name); + continue; + } + + profileLookupCallback.onProfileLookupSucceeded(new GameProfile(user.getUUID(), user.getUserName())); + } + if(!unknownNames.isEmpty()) { + fallback.findProfilesByNames(unknownNames.toArray(new String[0]), profileLookupCallback); + } + } + + @Override + public Optional findProfileByName(String s) { + return fallback.findProfileByName(s); + } + + @Override + public void inject() { + Services newServices = new Services(current.sessionService(), current.servicesKeySet(), this, current.profileCache(), current.paperConfigurations()); + field.set(MinecraftServer.getServer(), newServices); + } +} diff --git a/SpigotCore/SpigotCore_21/src/de/steamwar/entity/PacketConstructor21.java b/SpigotCore/SpigotCore_21/src/de/steamwar/entity/PacketConstructor21.java index 67e501e4..80ad1bc3 100644 --- a/SpigotCore/SpigotCore_21/src/de/steamwar/entity/PacketConstructor21.java +++ b/SpigotCore/SpigotCore_21/src/de/steamwar/entity/PacketConstructor21.java @@ -19,7 +19,9 @@ package de.steamwar.entity; +import net.minecraft.network.protocol.game.ClientboundAddEntityPacket; import net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket; +import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.PositionMoveRotation; import net.minecraft.world.phys.Vec3; @@ -31,4 +33,21 @@ public class PacketConstructor21 implements PacketConstructor{ PositionMoveRotation rot = new PositionMoveRotation(new Vec3(x, y, z), Vec3.ZERO, pitch, yaw); return new ClientboundTeleportEntityPacket(entityId, rot, Collections.emptySet(), false); } + + @Override + public Object createRPlayerSpawn(RPlayer player) { + return new ClientboundAddEntityPacket( + player.entityId, + player.uuid, + player.x, + player.y, + player.z, + player.yaw, + player.pitch, + EntityType.PLAYER, + 0, + Vec3.ZERO, + player.headYaw + ); + } } diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/TrickyTrialsWrapper8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/TrickyTrialsWrapper8.java index 9aff1020..1d9abc37 100644 --- a/SpigotCore/SpigotCore_8/src/de/steamwar/core/TrickyTrialsWrapper8.java +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/TrickyTrialsWrapper8.java @@ -19,6 +19,7 @@ package de.steamwar.core; +import com.mojang.authlib.properties.Property; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.EntityType; @@ -40,4 +41,9 @@ public class TrickyTrialsWrapper8 implements TrickyTrialsWrapper { public Material getTurtleScute() { return Material.STONE; } + + @Override + public String getValue(Property property) { + return property.getValue(); + } } diff --git a/SpigotCore/SpigotCore_8/src/de/steamwar/core/authlib/SteamwarGameProfileRepository8.java b/SpigotCore/SpigotCore_8/src/de/steamwar/core/authlib/SteamwarGameProfileRepository8.java new file mode 100644 index 00000000..be7ba13e --- /dev/null +++ b/SpigotCore/SpigotCore_8/src/de/steamwar/core/authlib/SteamwarGameProfileRepository8.java @@ -0,0 +1,72 @@ +/* + * This file is a part of the SteamWar software. + * + * Copyright (C) 2025 SteamWar.de-Serverteam + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package de.steamwar.core.authlib; + +import com.mojang.authlib.Agent; +import com.mojang.authlib.GameProfile; +import com.mojang.authlib.GameProfileRepository; +import com.mojang.authlib.ProfileLookupCallback; +import de.steamwar.Reflection; +import de.steamwar.sql.SteamwarUser; + +import java.util.ArrayList; +import java.util.List; + +public class SteamwarGameProfileRepository8 extends SteamwarGameProfileRepository { + + private static final GameProfileRepository fallback; + + private static final Object minecraftServer; + private static final Reflection.Field gameProfile; + + static { + Class minecraftServerClass = Reflection.getClass("net.minecraft.server.MinecraftServer"); + Class gpr = Reflection.getClass("com.mojang.authlib.GameProfileRepository"); + gameProfile = Reflection.getField(minecraftServerClass, gpr, 0); + minecraftServer = Reflection.getTypedMethod(minecraftServerClass, "getServer", minecraftServerClass).invoke(null); + fallback = (GameProfileRepository) gameProfile.get(minecraftServer); + } + + @Override + public void inject() { + gameProfile.set(minecraftServer, this); + } + + @Override + public void findProfilesByNames(String[] strings, Agent agent, ProfileLookupCallback profileLookupCallback) { + if(agent == Agent.SCROLLS) { + fallback.findProfilesByNames(strings, agent, profileLookupCallback); + } else { + List unknownNames = new ArrayList<>(); + for (String name:strings) { + SteamwarUser user = SteamwarUser.get(name); + if(user == null) { + unknownNames.add(name); + continue; + } + + profileLookupCallback.onProfileLookupSucceeded(new GameProfile(user.getUUID(), user.getUserName())); + } + if(!unknownNames.isEmpty()) { + fallback.findProfilesByNames(unknownNames.toArray(new String[0]), agent, profileLookupCallback); + } + } + } +} diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java index 64c16174..a7ea8b07 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/Core.java @@ -21,6 +21,12 @@ package de.steamwar.core; import com.comphenix.tinyprotocol.TinyProtocol; import de.steamwar.Reflection; +import de.steamwar.command.*; +import de.steamwar.core.authlib.SteamwarGameProfileRepository; +import de.steamwar.core.events.AntiNocom; +import de.steamwar.core.events.ChattingEvent; +import de.steamwar.core.events.PlayerJoinedEvent; +import de.steamwar.core.events.WorldLoadEvent; import de.steamwar.command.SWCommandUtils; import de.steamwar.command.SWTypeMapperCreator; import de.steamwar.command.TabCompletionCache; @@ -110,6 +116,9 @@ public class Core extends JavaPlugin { getServer().getMessenger().registerIncomingPluginChannel(this, "sw:bridge", new NetworkReceiver()); getServer().getMessenger().registerOutgoingPluginChannel(this, "sw:bridge"); + if (Core.getVersion() != 20) + SteamwarGameProfileRepository.impl.inject(); + TinyProtocol.init(); CheckpointUtils.signalHandler(); diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyTrialsWrapper.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyTrialsWrapper.java index ab0aeb61..98900f4a 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyTrialsWrapper.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/TrickyTrialsWrapper.java @@ -19,11 +19,10 @@ package de.steamwar.core; +import com.mojang.authlib.properties.Property; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.EntityType; -import org.bukkit.inventory.Inventory; -import org.bukkit.inventory.InventoryView; public interface TrickyTrialsWrapper { TrickyTrialsWrapper impl = VersionDependent.getVersionImpl(Core.getInstance()); @@ -33,4 +32,6 @@ public interface TrickyTrialsWrapper { Enchantment getUnbreakingEnchantment(); Material getTurtleScute(); + + String getValue(Property property); } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/AuthlibInjector.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/AuthlibInjector.java deleted file mode 100644 index 95927bf3..00000000 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/AuthlibInjector.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2025 SteamWar.de-Serverteam - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package de.steamwar.core.authlib; - -import de.steamwar.Reflection; -import com.mojang.authlib.GameProfileRepository; -import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository; -import de.steamwar.linkage.Linked; -import de.steamwar.linkage.MaxVersion; -import de.steamwar.linkage.api.Enable; - -@Linked -@MaxVersion(18) -public class AuthlibInjector implements Enable { - - @Override - public void enable() { - Class minecraftServerClass = Reflection.getClass("net.minecraft.server.MinecraftServer"); - Reflection.Field gameProfile = Reflection.getField(minecraftServerClass, GameProfileRepository.class, 0); - Object minecraftServer = Reflection.getTypedMethod(minecraftServerClass, "getServer", minecraftServerClass).invoke(null); - gameProfile.set(minecraftServer, new SteamwarGameProfileRepository((YggdrasilGameProfileRepository) gameProfile.get(minecraftServer))); - } -} diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/SteamwarGameProfileRepository.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/SteamwarGameProfileRepository.java index c2f9412c..85a2ca26 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/SteamwarGameProfileRepository.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/core/authlib/SteamwarGameProfileRepository.java @@ -19,42 +19,12 @@ package de.steamwar.core.authlib; -import com.mojang.authlib.Agent; -import com.mojang.authlib.GameProfile; import com.mojang.authlib.GameProfileRepository; -import com.mojang.authlib.ProfileLookupCallback; -import com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository; -import de.steamwar.sql.SteamwarUser; +import de.steamwar.core.Core; +import de.steamwar.core.VersionDependent; -import java.util.ArrayList; -import java.util.List; +public abstract class SteamwarGameProfileRepository implements GameProfileRepository { + public static final SteamwarGameProfileRepository impl = VersionDependent.getVersionImpl(Core.getInstance()); -public class SteamwarGameProfileRepository implements GameProfileRepository { - - private final YggdrasilGameProfileRepository fallback; - - public SteamwarGameProfileRepository(YggdrasilGameProfileRepository repository) { - fallback = repository; - } - - @Override - public void findProfilesByNames(String[] strings, Agent agent, ProfileLookupCallback profileLookupCallback) { - if(agent == Agent.SCROLLS) { - fallback.findProfilesByNames(strings, agent, profileLookupCallback); - } else { - List unknownNames = new ArrayList<>(); - for (String name:strings) { - SteamwarUser user = SteamwarUser.get(name); - if(user == null) { - unknownNames.add(name); - continue; - } - - profileLookupCallback.onProfileLookupSucceeded(new GameProfile(user.getUUID(), user.getUserName())); - } - if(!unknownNames.isEmpty()) { - fallback.findProfilesByNames(unknownNames.toArray(new String[0]), agent, profileLookupCallback); - } - } - } + public abstract void inject(); } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/PacketConstructor.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/PacketConstructor.java index 6fe49aa8..070b975e 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/PacketConstructor.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/PacketConstructor.java @@ -23,7 +23,8 @@ import de.steamwar.core.Core; import de.steamwar.core.VersionDependent; public interface PacketConstructor { - public static final PacketConstructor impl = VersionDependent.getVersionImpl(Core.getInstance()); + PacketConstructor impl = VersionDependent.getVersionImpl(Core.getInstance()); Object teleportPacket(int entityId, double x, double y, double z, float yaw, float pitch); + Object createRPlayerSpawn(RPlayer player); } diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntity.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntity.java index 840b413e..1331f826 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntity.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/REntity.java @@ -58,9 +58,9 @@ public class REntity { protected double y; @Getter protected double z; - private byte yaw; - private byte pitch; - private byte headYaw; + protected byte yaw; + protected byte pitch; + protected byte headYaw; @Getter private boolean hidden; diff --git a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RPlayer.java b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RPlayer.java index ce79a8cb..9883cdde 100644 --- a/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RPlayer.java +++ b/SpigotCore/SpigotCore_Main/src/de/steamwar/entity/RPlayer.java @@ -22,10 +22,7 @@ package de.steamwar.entity; import com.mojang.authlib.GameProfile; import com.mojang.authlib.properties.Property; import de.steamwar.Reflection; -import de.steamwar.core.BountifulWrapper; -import de.steamwar.core.Core; -import de.steamwar.core.FlatteningWrapper; -import de.steamwar.core.ProtocolWrapper; +import de.steamwar.core.*; import de.steamwar.network.CoreNetworkHandler; import de.steamwar.network.NetworkSender; import de.steamwar.network.packets.common.PlayerSkinRequestPacket; @@ -82,7 +79,7 @@ public class RPlayer extends REntity { NetworkSender.sendOrQueue(new PlayerSkinRequestPacket(actualUUID)); return new Property("textures", null, null); }); - if (skinData.getValue() != null) { + if (TrickyTrialsWrapper.impl.getValue(skinData) != null) { GameProfile gameProfile = new GameProfile(uuid, name); gameProfile.getProperties().put("textures", skinData); return gameProfile; @@ -117,10 +114,21 @@ public class RPlayer extends REntity { packetSink.accept(ProtocolWrapper.impl.playerInfoPacketConstructor(ProtocolWrapper.PlayerInfoAction.REMOVE, saved, GameMode.CREATIVE)); } - private static final Class namedSpawnPacket = Reflection.getClass("net.minecraft.network.protocol.game.ClientboundAddPlayerPacket"); - private static final Function namedSpawnPacketGenerator = spawnPacketGenerator(namedSpawnPacket, Core.getVersion() == 8 ? 1 : 0); - private static final Reflection.Field namedSpawnUUID = Reflection.getField(namedSpawnPacket, UUID.class, 0); + private static Class namedSpawnPacket = null; + private static Function namedSpawnPacketGenerator = null; + private static Reflection.Field namedSpawnUUID = null; + + static { + try { + namedSpawnPacket = Reflection.getClass("net.minecraft.network.protocol.game.ClientboundAddPlayerPacket"); + namedSpawnPacketGenerator = spawnPacketGenerator(namedSpawnPacket, Core.getVersion() == 8 ? 1 : 0); + namedSpawnUUID = Reflection.getField(namedSpawnPacket, UUID.class, 0); + } catch (IllegalArgumentException e) { } + } + private Object getNamedSpawnPacket() { + if (Core.getVersion() >= 21) return PacketConstructor.impl.createRPlayerSpawn(this); + Object packet = namedSpawnPacketGenerator.apply(this); namedSpawnUUID.set(packet, uuid); FlatteningWrapper.impl.setNamedSpawnPacketDataWatcher(packet); diff --git a/settings.gradle.kts b/settings.gradle.kts index fc08ed92..323b0517 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -113,6 +113,7 @@ dependencyResolutionManagement { library("paperapi", "io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT") library("paperapi21", "io.papermc.paper:paper-api:1.21.6-R0.1-SNAPSHOT") library("authlib", "com.mojang:authlib:1.5.25") + library("authlib2", "com.mojang:authlib:6.0.58") library("datafixer", "com.mojang:datafixerupper:4.0.26") library("brigadier", "com.mojang:brigadier:1.0.18") library("anvilgui", "net.wesjd:anvilgui:1.10.6-SNAPSHOT")