packetevents
packetevents copied to clipboard
NoSuchMethodException: net.minecraft.world.item.ItemStack.<init>(net.minecraft.world.item.Item,int)
java.lang.NoSuchMethodException: net.minecraft.world.item.ItemStack.
java.lang.NullPointerException: Cannot invoke "java.lang.reflect.Field.get(Object)" because the return value of "com.github.retrooper.packetevents.util.reflection.Reflection.getField(java.lang.Class, java.lang.Class, int)" is null at io.github.retrooper.packetevents.util.SpigotReflectionUtil.getMinecraftServerConnectionInstance(SpigotReflectionUtil.java:406) at io.github.retrooper.packetevents.injector.SpigotChannelInjector.isServerBound(SpigotChannelInjector.java:63) at io.github.retrooper.packetevents.factory.spigot.SpigotPacketEventsBuilder$1.load(SpigotPacketEventsBuilder.java:115) at io.github.retrooper.packetevents.factory.spigot.SpigotPacketEventsBuilder$1.init(SpigotPacketEventsBuilder.java:137)
version 1.20.6 paper This server is running Paper version git-Paper-53 (MC: 1.20.6) (Implementing API version 1.20.6-R0.1-SNAPSHOT) (Git: 5729b29)
PacketEvents can't seem to find the ItemLike
class (IMaterial
with spigot mappings) and tries to use the normal Item
class instead
Are you shading packetevents or using it as a separate plugin? If you're shading, are you compiling to mojang or spigot mappings?
This was discussed on discord partially already: https://discord.com/channels/721686193061888071/755472595096174873/1238091719157743656
- Paper uses original Mojang mappings instead of obfuscated mappings since 1.20.5
- Are you using minimizeJar option? See #779
- If you don't shade packetevents, Papers remapping of spigot plugins will work properly
- This doesn't apply here, this issue is about packetevents failing to find a vanilla method