ProtocolLib fails to load on Minecraft 1.21 with IllegalArgumentException
Xbaishu opened this issue · 2 comments
Description
ProtocolLib fails to load on a Minecraft server running version 1.21. The server throws an IllegalArgumentException
during the loading process, indicating that it cannot find a matching field using FuzzyReflection.
Steps to Reproduce
- Start a Paper Minecraft server with version 1.21.
- Install ProtocolLib version 5.2.0-SNAPSHOT-679.
- Attempt to start the server.
Expected Behavior
ProtocolLib should load without errors and be ready for use on the server.
Actual Behavior
The server fails to start with the following error:
[19:51:49] [Server thread/WARN]: [ProtocolLib] Version (MC: 1.21.0) has not yet been tested! Proceed with caution.
[19:51:51] [Server thread/ERROR]: [ProtocolLib] Assuming package version: v1_21_R1
[19:51:51] [Server thread/ERROR]: [ProtocolLib] INTERNAL ERROR: Cannot load ProtocolLib.
If this problem hasn't already been reported, please open a ticket
at https://github.com/dmulloy2/ProtocolLib/issues with the following data:
Stack Trace:
java.lang.IllegalArgumentException: Unable to find a field that matches {modifiers=[required: 10000, banned: 1000], type={ type input instanceof interface java.util.Map }}
at ProtocolLib5.2.0.jar//com.comphenix.protocol.reflect.FuzzyReflection.getField(FuzzyReflection.java:352)
at ProtocolLib5.2.0.jar//com.comphenix.protocol.injector.packet.PacketRegistry.createNewRegister(PacketRegistry.java:183)
at ProtocolLib5.2.0.jar//com.comphenix.protocol.injector.packet.PacketRegistry.initialize(PacketRegistry.java:334)
at ProtocolLib5.2.0.jar//com.comphenix.protocol.injector.packet.PacketRegistry.getClientPacketTypes(PacketRegistry.java:369)
at ProtocolLib5.2.0.jar//com.comphenix.protocol.injector.PacketFilterManager.(PacketFilterManager.java:120)
at ProtocolLib5.2.0.jar//com.comphenix.protocol.injector.PacketFilterBuilder.build(PacketFilterBuilder.java:121)
at ProtocolLib5.2.0.jar//com.comphenix.protocol.ProtocolLib.onLoad(ProtocolLib.java:183)
at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:59)
at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:18)
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:39)
at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:40)
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:535)
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:290)
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1157)
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329)
at java.base/java.lang.Thread.run(Thread.java:1583)
Dump:
Parameters:
[NULL]
Sender:
com.comphenix.protocol.ProtocolLib@c9c1da[
statistics=
packetTask=
tickCounter=0
configExpectedMod=-1
updater=com.comphenix.protocol.updater.SpigotUpdater@68f37f05
redirectHandler=
scheduler=com.comphenix.protocol.scheduler.DefaultScheduler@267ab4d0
commandProtocol=
commandPacket=
commandFilter=
packetLogging=
skipDisable=false
isEnabled=false
loader=io.papermc.paper.plugin.manager.DummyBukkitPluginLoader@7bfe0b34
server=CraftServer{serverName=Paper,serverVersion=1.21-38-1f5db50,minecraftVersion=1.21}
file=plugins.paper-remapped\ProtocolLib5.2.0.jar
description=org.bukkit.plugin.PluginDescriptionFile@4a290338
pluginMeta=org.bukkit.plugin.PluginDescriptionFile@4a290338
dataFolder=plugins\ProtocolLib
classLoader=PluginClassLoader{plugin=ProtocolLib v5.2.0-SNAPSHOT-679, pluginEnabled=false, url=plugins.paper-remapped\ProtocolLib5.2.0.jar}
naggable=true
newConfig=YamlConfiguration[path='', root='YamlConfiguration']
configFile=plugins\ProtocolLib\config.yml
logger=com.destroystokyo.paper.utils.PaperPluginLogger@513a20f3
lifecycleEventManager=io.papermc.paper.plugin.lifecycle.event.PaperLifecycleEventManager@6dae40a5
allowsLifecycleRegistration=true
]
Version:
ProtocolLib v5.2.0-SNAPSHOT-679
Java Version:
21.0.3
Server:
1.21-38-1f5db50 (MC: 1.21)
Server Information
- Minecraft Version: 1.21
- ProtocolLib Version: 5.2.0-SNAPSHOT-679
- Server Software (e.g. Spigot, Paper): Paper version 1.21-38-1f5db50
- Java Version: 21.0.3
Should be fixed in the latest dev build so please use the latest dev build and try again: https://ci.dmulloy2.net/job/ProtocolLib/lastSuccessfulBuild/
Should be fixed in the latest dev build so please use the latest dev build and try again: https://ci.dmulloy2.net/job/ProtocolLib/lastSuccessfulBuild/
After testing, I found that it is currently running smoothly. Thank you very much.