LuckPerms

LuckPerms

41.4k Downloads

[Sponge] Error with ComputerCraft Turtles

inklit opened this issue ยท 9 comments

commented

This issue happens whenever isBlockProtected is fired, which calls ChangeBlockEvent.Pre, which GriefPrevention listens on and requests the permission related to it. This seems to fail for some reason.
It also fails on PermissionsEx.

[00:00:14] [Server thread/ERROR] [Sponge]: Could not pass ChangeBlockEvent$Pre$Impl to Plugin{id=griefprevention, name=GriefPrevention, version=2.2.0, description=This plugin is designed to prevent all forms of grief., source=/opt/mcf/mods/griefprevention-1.10.2-2.2.0.145.jar}
java.lang.NullPointerException
        at me.lucko.luckperms.sponge.service.LuckPermsService.lambda$convertContexts$0(LuckPermsService.java:173) ~[LuckPermsService.class:?]
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_91]
        at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540) ~[?:1.8.0_91]
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_91]
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_91]
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[?:1.8.0_91]
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_91]
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[?:1.8.0_91]
        at me.lucko.luckperms.sponge.service.LuckPermsService.convertContexts(LuckPermsService.java:173) ~[LuckPermsService.class:?]
        at me.lucko.luckperms.sponge.service.LuckPermsSubject.getPermissionValue(LuckPermsSubject.java:47) ~[LuckPermsSubject.class:?]
        at net.minecraft.entity.player.EntityPlayerMP.getPermissionValue(EntityPlayerMP.java:148) ~[lu.class:?]
        at me.ryanhamshire.griefprevention.GPPermissionHandler.getUserPermission(GPPermissionHandler.java:115) ~[GPPermissionHandler.class:?]
        at me.ryanhamshire.griefprevention.GPPermissionHandler.getClaimPermission(GPPermissionHandler.java:83) ~[GPPermissionHandler.class:?]
        at me.ryanhamshire.griefprevention.claim.Claim.allowBuild(Claim.java:504) ~[Claim.class:?]
        at me.ryanhamshire.griefprevention.GriefPrevention.allowBuild(GriefPrevention.java:1186) ~[GriefPrevention.class:?]
        at me.ryanhamshire.griefprevention.event.BlockEventHandler.onBlockPre(BlockEventHandler.java:131) ~[BlockEventHandler.class:?]
        at org.spongepowered.common.event.listener.PreListener_BlockEventHandler_onBlockPre66.handle(Unknown Source) ~[?:?]
        at org.spongepowered.common.event.RegisteredListener.handle(RegisteredListener.java:95) ~[RegisteredListener.class:1.10.2-2123-5.1.0-BETA-1923]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:357) [SpongeModEventManager.class:1.10.2-2123-5.1.0-BETA-1923]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:398) [SpongeModEventManager.class:1.10.2-2123-5.1.0-BETA-1923]
        at org.spongepowered.mod.event.SpongeModEventManager.post(SpongeModEventManager.java:370) [SpongeModEventManager.class:1.10.2-2123-5.1.0-BETA-1923]
        at org.spongepowered.common.SpongeImpl.postEvent(SpongeImpl.java:141) [SpongeImpl.class:1.10.2-2123-5.1.0-BETA-1923]
        at net.minecraft.server.dedicated.DedicatedServer.func_175579_a(DedicatedServer.java:110) [ld.class:?]
        at dan200.computercraft.ComputerCraft.isBlockEnterable(ComputerCraft.java:454) [ComputerCraft.class:?]
        at dan200.computercraft.shared.turtle.core.TurtleMoveCommand.canEnter(TurtleMoveCommand.java:163) [TurtleMoveCommand.class:?]
        at dan200.computercraft.shared.turtle.core.TurtleMoveCommand.execute(TurtleMoveCommand.java:45) [TurtleMoveCommand.class:?]
        at dan200.computercraft.shared.turtle.core.TurtleBrain.updateCommands(TurtleBrain.java:998) [TurtleBrain.class:?]
        at dan200.computercraft.shared.turtle.core.TurtleBrain.update(TurtleBrain.java:185) [TurtleBrain.class:?]
        at dan200.computercraft.shared.turtle.blocks.TileTurtle.func_73660_a(TileTurtle.java:259) [TileTurtle.class:?]
        at org.spongepowered.common.event.tracking.TrackingUtil.tickTileEntity(TrackingUtil.java:211) [TrackingUtil.class:1.10.2-2123-5.1.0-BETA-1923]
        at net.minecraft.world.WorldServer.redirect$onUpdateTileEntities$zjk000(WorldServer.java:1298) [ls.class:?]
        at net.minecraft.world.World.func_72939_s(World.java:1282) [aid.class:?]
        at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:713) [ls.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:709) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387) [ld.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
commented

Not sure if this is relevant information but I found that everybodys name is null after a migration from PermissionsEx:

{
    "uuid": "c1ca957e-fb26-4ea0-b339-20802fcf2d33",
    "name": "null",
    "primaryGroup": "default",
    "perms": {
        "group.default": true,
        "meta.name.086": true,
        "(gp_claim=8ae7bdd2-a235-4622-a574-07fb8ba72ec3)griefprevention.claim.flag.enter-claim": false
    }
}
commented

Apparently this is a problem on GriefPreventions end. However, the name thing is still an issue.

commented

I fixed the context issue. I do have confirmations about the null name after PEX migrations.

commented

The username though is stored in the config file, just not in the correct location.

commented

The null username issue will be fixed when the Sponge permission API receives it's update for version 6.0.0.

The issue is, currently, other plugins are requesting the user before they've been handled by LuckPerms as a normal player on the standard login events. I can't really fix that easily until the API is changed.

(not entirely true, it's just a real pain to fix.)

I am hopeful that the Sponge updates will be pushed soon, and I can then update LP shortly afterwards and cleanup these remaining issues.

The username isn't entirely necessary for the functionality of the plugin. I'll keep this open though until it gets fixed.

commented

Correct location, not sure what you mean by that?

commented

meta.name is correct, but the name at the top is not.
I did not set meta.name myself

commented

Meta.name would've come from the PEX migration, I don't set that.

commented

Closing this since the NPE with GP was fixed. I've opened a new issue for the null name & JSON storage issue.