ChangeSkinX

ChangeSkinX

446k Downloads

Cannot invoke "net.minecraft.core.Holder.a()" because "holder" is null

Lucien2714 opened this issue ยท 9 comments

commented

normal players can't trigger the commands they will get a message, "I'm sorry, but you do not have the permission to perform this command. Please contact the server administrators if you believe that this is in error."
Config: default
Server: papermc1.18.2 with geyser
I checked the config and I am a little bit confused about it, is there something I didn't config correctly?

commented

Which server platform do you use? In case of proxies like BungeeCord, you have to give the users the permission on the proxy not like usually on the Spigot server.

commented

I am using Papermc with the Geyser plugin for bedrock players to join my server. And I tried the /setskin command as op, every time I will just be kicked out of the server, after rejoining I was able to see my skins changed.

Which server platform do you use? In case of proxies like BungeeCord, you have to give the users the permission on the proxy not like usually on the Spigot server.

commented

Please post the server log for that time.

commented

test2 is a OP in the server

[09:09:05] [Server thread/INFO]: test2 issued server command: /setskin notch
[09:09:06] [Netty Server IO #0/ERROR]: Packet encoding of packet ID 61 threw (skippable? false)
java.lang.NullPointerException: Cannot invoke "net.minecraft.core.Holder.a()" because "holder" is null
	at net.minecraft.resources.RegistryFileCodec.encode(RegistryFileCodec.java:52) ~[paper-1.18.2.jar:git-Paper-265]
	at net.minecraft.resources.RegistryFileCodec.encode(RegistryFileCodec.java:18) ~[paper-1.18.2.jar:git-Paper-265]
	at com.mojang.serialization.Encoder.encodeStart(Encoder.java:14) ~[datafixerupper-4.1.27.jar:?]
	at net.minecraft.network.FriendlyByteBuf.writeWithCodec(FriendlyByteBuf.java:106) ~[?:?]
	at net.minecraft.network.protocol.game.ClientboundRespawnPacket.write(ClientboundRespawnPacket.java:50) ~[?:?]
	at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:41) ~[paper-1.18.2.jar:git-Paper-265]
	at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:14) ~[paper-1.18.2.jar:git-Paper-265]
	at jdk.internal.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at com.comphenix.protocol.injector.netty.ChannelInjector.encode(ChannelInjector.java:531) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.ChannelInjector.access$100(ChannelInjector.java:72) ~[ProtocolLib.jar:?]
	at com.comphenix.protocol.injector.netty.ChannelInjector$1.encode(ChannelInjector.java:271) ~[ProtocolLib.jar:?]
	at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at com.comphenix.protocol.injector.netty.ChannelInjector$1.write(ChannelInjector.java:277) ~[ProtocolLib.jar:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:790) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:808) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1025) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:306) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at com.comphenix.protocol.injector.netty.ChannelProxy.writeAndFlush(ChannelProxy.java:327) ~[ProtocolLib.jar:?]
	at net.minecraft.network.Connection.doSendPacket(Connection.java:462) ~[?:?]
	at net.minecraft.network.Connection.lambda$writePacket$11(Connection.java:436) ~[?:?]
	at com.comphenix.protocol.injector.netty.ChannelInjector$3.lambda$onMessageScheduled$1(ChannelInjector.java:354) ~[ProtocolLib.jar:?]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-all-4.1.68.Final.jar:4.1.68.Final]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
[09:09:06] [Server thread/INFO]: test2 lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException: Cannot invoke "net.minecraft.core.Holder.a()" because "holder" is null
[09:09:06] [Server thread/INFO]: test2 left the game

For players who isn't a OP the log only prints
[xx:xx:xx] [Server thread/INFO]: xxx issued server command: /setskin xxxxx

Please post the server log for that time.

commented

Which version of ProtocolLib do you have?

commented

v4.8.0, I think it is the latest version

Which version of ProtocolLib do you have?

commented

Could you please try it out without Geyser to find out the source.

commented

sry I didn't check github yesterday. I tried without Geyser and the problems still exist. Here is my test server(Idk why I couldn't put it on github so I am putting it on google drive). download link. btw the server is set to run it 25564 port since my main server was running on 25565.

commented

Okay found it. The error is from: datafixerupper. So this tool makes issues here.