[LuckPerms] Permission Denied for Commands
CDAGaming opened this issue ยท 10 comments
#97 Basically, except on LuckPerms (Which Unfortunatly /op DiscordFakeUser doesn't solve
LuckPerms/LuckPerms#834
They say it would be up to you to bridge the gap :P
CDAGaming, for those of us who are only familiar with Forge and barely know what sponge/bukkit are, can you tell us how we would reproduce this issue? Like which things do we go download and put together, to make a server which has LuckPerms and DiscordIntegration installed, and then what do we put in the config, so that we can run the same command you run when you get permission denied? If I can get such a thing cobbled together then I (or Chikachi) might be able to hook a debugger to it and figure out what's going on.
SpongeForge is technically a mod, which can be put in your servers mods folder. This adds a plugins subfolder into the mods folder for sponge plugins, which in this case, Luck perms. I can send over my DiscordIntegration config and Help for LuckPerms is on it's Wiki/GitHub, or accessible via /lp help
Thanks, sounds doable. Yeah it would help to have the config (make sure to remove/censor your discord API key) and the command(s) you ran in luckperms to try to give the fake user permission.
https://hastebin.com/biwuzamofe.swift
(Commands and Config Used ^^)
Here's the relevant log message when I tried to type !stop
in discord chat:
[16:22:01] [JDA MainWS-ReadThread/WARN] [Sponge]: No entity type is registered for class chikachi.discord.DiscordCommandSender
[16:22:01] [JDA MainWS-ReadThread/INFO] [STDERR]: [chikachi.discord.repack.net.dv8tion.jda.core.utils.SimpleLog:print:267]: [16:22:01] [ERROR] [chikachi.discord.repack.net.dv8tion.jda.core.JDA]: One of the EventListeners had an uncaught exception
[16:22:01] [JDA MainWS-ReadThread/INFO] [STDERR]: [chikachi.discord.repack.net.dv8tion.jda.core.utils.SimpleLog:print:267]: [16:22:01] [ERROR] [chikachi.discord.repack.net.dv8tion.jda.core.JDA]: Encountered an Exception:
java.lang.IllegalStateException: CauseStackManager called from off main thread (current='ReadingThread{class=class chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread, name=JDA MainWS-ReadThread, priority=5, group=net.minecraftforge.fml.common.thread.SidedThreadGroup[name=SERVER,maxpri=10]}', expected='Thread{class=class java.lang.Thread, name=Server thread, priority=5, group=net.minecraftforge.fml.common.thread.SidedThreadGroup[name=SERVER,maxpri=10]}')!
at org.spongepowered.common.event.SpongeCauseStackManager.enforceMainThread(SpongeCauseStackManager.java:71)
at org.spongepowered.common.event.SpongeCauseStackManager.pushCause(SpongeCauseStackManager.java:107)
at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:298)
at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1083)
at chikachi.discord.listener.DiscordListener.tryExecuteCommand(DiscordListener.java:214)
at chikachi.discord.listener.DiscordListener.onMessageReceived(DiscordListener.java:105)
at chikachi.discord.repack.net.dv8tion.jda.core.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:404)
at chikachi.discord.repack.net.dv8tion.jda.core.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:84)
at chikachi.discord.repack.net.dv8tion.jda.core.handle.MessageCreateHandler.handleDefaultMessage(MessageCreateHandler.java:128)
at chikachi.discord.repack.net.dv8tion.jda.core.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:49)
at chikachi.discord.repack.net.dv8tion.jda.core.handle.SocketHandler.handle(SocketHandler.java:37)
at chikachi.discord.repack.net.dv8tion.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:969)
at chikachi.discord.repack.net.dv8tion.jda.core.requests.WebSocketClient.onTextMessage(WebSocketClient.java:661)
at chikachi.discord.repack.com.neovisionaries.ws.client.ListenerManager.callOnTextMessage(ListenerManager.java:352)
at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:260)
at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.callOnTextMessage(ReadingThread.java:238)
at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.handleTextFrame(ReadingThread.java:963)
at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:746)
at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)
at chikachi.discord.repack.com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)
at chikachi.discord.repack.com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)
The "No entity type" message from sponge comes from: https://github.com/SpongePowered/SpongeCommon/blob/stable-7/src/main/java/org/spongepowered/common/registry/type/entity/EntityTypeRegistryModule.java#L252
The IllegalStateException is a red herring thrown by sponge trying to print out the actual exception. I'm working to reveal that one.
Well nevermind. It's fixed in 3.0.5, I can run !stop
just fine. Double checked that if I use the 3.0.4 from curseforge I get the above, and if I use 3.0.5 it succeeds.
Oh right, that's actually the description of #119 ...