LuckPerms

LuckPerms

41.4k Downloads

java.lang.NullPointerException: permission

TheFruxz opened this issue ยท 2 comments

commented

Description

On a velocity network, if someone gets the * permission or get inside a group, containing the * permission, the player gets kicked with the exception:

[08:24:05 ERROR]: [server connection] Fruxz -> lobby: exception encountered in com.velocitypowered.proxy.connection.backend.BackendPlaySessionHandler@73fecb05
java.lang.NullPointerException: permission
        at me.lucko.luckperms.common.cacheddata.type.PermissionCache.checkPermission(PermissionCache.java:98) ~[?:?]
        at me.lucko.luckperms.velocity.service.PlayerPermissionProvider.getPermissionValue(PlayerPermissionProvider.java:58) ~[?:?]
        at com.velocitypowered.proxy.connection.client.ConnectedPlayer.getPermissionValue(ConnectedPlayer.java:949) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.api.permission.PermissionSubject.hasPermission(PermissionSubject.java:24) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at it.frafol.cleanping.velocity.commands.PingCommand.lambda$register$5(PingCommand.java:166) ~[?:?]
        at com.mojang.brigadier.tree.CommandNode.canUse(CommandNode.java:80) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.command.CommandGraphInjector.filterNode(CommandGraphInjector.java:111) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.command.CommandGraphInjector.copyChildren(CommandGraphInjector.java:130) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.command.CommandGraphInjector.filterNode(CommandGraphInjector.java:123) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.command.CommandGraphInjector.copyChildren(CommandGraphInjector.java:130) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.command.CommandGraphInjector.inject(CommandGraphInjector.java:91) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.connection.backend.BackendPlaySessionHandler.handle(BackendPlaySessionHandler.java:341) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.protocol.packet.AvailableCommandsPacket.handle(AvailableCommandsPacket.java:191) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.connection.MinecraftConnection.channelRead(MinecraftConnection.java:153) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.protocol.netty.AutoReadHolderHandler.channelRead(AutoReadHolderHandler.java:57) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.tryDecode(MinecraftDecoder.java:92) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at com.velocitypowered.proxy.protocol.netty.MinecraftDecoder.channelRead(MinecraftDecoder.java:61) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:509) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[velocity.jar:3.3.0-SNAPSHOT (git-a9a31f69-b385)]
        at java.base/java.lang.Thread.run(Thread.java:840) [?:?]

Reproduction Steps

  • install velocity on a velocity proxy
  • give a player the * permission, or a group, with the * permission inside
  • player gets kicked

Expected Behaviour

Player having every permission

Server Details

Velocity 3.3.0-SNAPSHOT (git-a9a31f69-b385)

LuckPerms Version

3.3.0-SNAPSHOT (git-a9a31f69-b385)

Logs and Configs

https://gist.github.com/TheFruxz/91f13c762a31835ec26783fa49e9859c

Extra Details

[08:33:20 INFO]: [LP] Running LuckPerms v5.4.124 by Luck.
[08:33:20 INFO]: [LP] -  Platform: Velocity
[08:33:20 INFO]: [LP] -  Server Brand: Velocity
[08:33:20 INFO]: [LP] -  Server Version:
[08:33:20 INFO]: [LP]      3.3.0-SNAPSHOT (git-a9a31f69-b385)
[08:33:20 INFO]: [LP] -  Storage:
[08:33:20 INFO]: [LP]      Type: MySQL
[08:33:20 INFO]: [LP]      Connected: true
[08:33:20 INFO]: [LP]      Ping: 0ms
[08:33:20 INFO]: [LP] -  Extensions:
[08:33:20 INFO]: [LP]      None
[08:33:20 INFO]: [LP] -  Messaging: Sql
[08:33:20 INFO]: [LP] -  Instance:
[08:33:20 INFO]: [LP]      Static contexts: (server=proxy)
[08:33:20 INFO]: [LP]      Online Players: 5 (5 unique)
[08:33:20 INFO]: [LP]      Uptime: 15m 35s
[08:33:20 INFO]: [LP]      Local Data: 5 users, 6 groups, 0 tracks
commented

The issue is with it.frafol.cleanping.velocity.commands.PingCommand.lambda$register$5(PingCommand.java:166) ~[?:?]

commented

oh, sorry, normally I notice something like that quite quickly. it was actually the plugin's fault.