Closed SnickoDeadMC closed 1 year ago
While I was hesitant to say this at first, I think this is a paper bug. We just use the standard Player#isBanned API method, it looks like invalid CraftPlayerProfile cast is happening inside the paper server implementation.
Yes, it is a paper bug: https://github.com/PaperMC/Paper/issues/9455
Sometimes when a player logs in, this error shows in the console. I'm on Paper 1.20 build 64
https://pastebin.com/wYJULshM
06.07 02:46:57 [Server] [ERROR] Could not pass event PlayerKickEvent to NamelessMC v3.2.3 06.07 02:46:57 [Server] [INFO] java.lang.ClassCastException: class com.destroystokyo.paper.profile.CraftPlayerProfile cannot be cast to class org.bukkit.craftbukkit.v1_20_R1.profile.CraftPlayerProfile (com.destroystokyo.paper.profile.CraftPlayerProfile and org.bukkit.craftbukkit.v1_20_R1.profile.CraftPlayerProfile are in unnamed module of loader java.net.URLClassLoader @2b71fc7e) 06.07 02:46:57 [Server] [INFO] at org.bukkit.craftbukkit.v1_20_R1.ban.CraftProfileBanList.isBanned(CraftProfileBanList.java:79) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at org.bukkit.craftbukkit.v1_20_R1.ban.CraftProfileBanList.isBanned(CraftProfileBanList.java:17) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer.isBanned(CraftPlayer.java:1631) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at com.namelessmc.plugin.bukkit.BukkitEventProxy.onBan(BukkitEventProxy.java:47) ~[NamelessMC.jar:?] 06.07 02:46:57 [Server] [INFO] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor152.execute(Unknown Source) ~[?:?] 06.07 02:46:57 [Server] [INFO] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] 06.07 02:46:57 [Server] [INFO] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] 06.07 02:46:57 [Server] [INFO] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] 06.07 02:46:57 [Server] [INFO] at net.minecraft.server.network.ServerGamePacketListenerImpl.disconnect(ServerGamePacketListenerImpl.java:518) ~[?:?] 06.07 02:46:57 [Server] [INFO] at net.minecraft.server.network.ServerGamePacketListenerImpl.disconnect(ServerGamePacketListenerImpl.java:483) ~[?:?] 06.07 02:46:57 [Server] [INFO] at net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGamePacketListenerImpl.java:407) ~[?:?] 06.07 02:46:57 [Server] [INFO] at net.minecraft.network.Connection.tick(Connection.java:602) ~[?:?] 06.07 02:46:57 [Server] [INFO] at net.minecraft.server.network.ServerConnectionListener.tick(ServerConnectionListener.java:234) ~[?:?] 06.07 02:46:57 [Server] [INFO] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1587) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1394) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1171) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-64] 06.07 02:46:57 [Server] [INFO] at java.lang.Thread.run(Thread.java:833) ~[?:?]