Purpur - IllegalArgumentException: Unable to find a method that matches
Elikill58 opened this issue ยท 1 comments
Describe the bug
I get this error when login:
[ProtocolLib] [Debug] Exception registering converter
java.lang.IllegalArgumentException: Unable to find a method that matches {modifiers=[required: 0, banned: 0], params=[{Type: class name of net\.minecraft\.(\p{javaJavaIdentifierStart}\p{javaJavaIdentifierPart}*\.)+\p{javaJavaIdentifierStart}\p{javaJavaIdentifierPart}*, Index: null}, {Type: Exact class java.lang.String, Index: 0}, {Type: Exact class java.lang.String, Index: 1}, {Type: Exact class java.lang.String, Index: 4}], paramCount=5}
at com.comphenix.protocol.reflect.FuzzyReflection.getMethod(FuzzyReflection.java:174) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.utility.MinecraftReflection.getWorldTypeClass(MinecraftReflection.java:1191) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.wrappers.BukkitConverters.addConverter(BukkitConverters.java:1197) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.wrappers.BukkitConverters.getConvertersForGeneric(BukkitConverters.java:1176) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.wrappers.BukkitConverters.getUnwrappers(BukkitConverters.java:1217) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.PacketConstructor.<init>(PacketConstructor.java:60) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.PacketConstructor.<clinit>(PacketConstructor.java:45) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.BukkitUnwrapper.unwrapItem(BukkitUnwrapper.java:107) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.utility.MinecraftFields.getNetworkManager(MinecraftFields.java:30) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.netty.channel.InjectionFactory.fromPlayer(InjectionFactory.java:96) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.netty.manager.NetworkManagerPlayerInjector.updatePlayer(NetworkManagerPlayerInjector.java:69) ~[ProtocolLib.jar:?]
at com.comphenix.protocol.injector.PacketFilterManager$1.handleLogin(PacketFilterManager.java:463) ~[ProtocolLib.jar:?]
at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:37) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:76) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:git-Purpur-1628]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:671) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at net.minecraft.server.players.PlayerList.canPlayerLogin(PlayerList.java:781) ~[purpur-1.18.2.jar:git-Purpur-1628]
at net.minecraft.server.network.ServerLoginPacketListenerImpl.handleAcceptedLogin(ServerLoginPacketListenerImpl.java:173) ~[?:?]
at net.minecraft.server.network.ServerLoginPacketListenerImpl.tick(ServerLoginPacketListenerImpl.java:84) ~[?:?]
at net.minecraft.network.Connection.tick(Connection.java:567) ~[?:?]
at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:229) ~[?:?]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1648) ~[purpur-1.18.2.jar:git-Purpur-1628]
at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:522) ~[purpur-1.18.2.jar:git-Purpur-1628]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1482) ~[purpur-1.18.2.jar:git-Purpur-1628]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1246) ~[purpur-1.18.2.jar:git-Purpur-1628]
at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:320) ~[purpur-1.18.2.jar:git-Purpur-1628]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
To Reproduce
Steps to reproduce the behavior:
- Download purpur 1.18.2
- Use it
- Enable debug
- Start server & login on it
Version Info
Here is the ProtocolLib dump
Additional context
This is the complete code that use ProtocolLib's API
protocolManager = ProtocolLibrary.getProtocolManager();
protocolManager.addPacketListener(new PacketAdapter(pl, ListenerPriority.LOWEST, Arrays.asList(Play.Server.CHAT)) {
@Override
public void onPacketSending(PacketEvent e) {
Player p = e.getPlayer();
if (p == null || e.isPlayerTemporary())
return;
// here some code
}
});
protocolManager.addPacketListener(new HandshakeListener(pl));