Thutmose / ThutPerms

Permissions mod for Forge
5 stars 2 forks source link

Can't use Certain commands without being opped [Pixelmon] #20

Open Ryokoie opened 6 years ago

Ryokoie commented 6 years ago

So This new update helped! It allowed my players to be able to use Set Home, TPA, etc. Very Very happy with that. However, no matter what I try it does not allow my players to use any of the pixelmon commands without being opped. I did a List of allowed commands direct from my console for the group of "Trainer", and while IVs, Evs, and Wondertrade are all there. They state that the players don't have permission to use them, however they can use /sethome, /back, and various other commands. If anyone knows a fix that'd be appreciated. ^_^

Log Copy of allowed commands:

[08:58:26] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: List of allowed commands:§r

[08:58:26] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: all set to: false§r

Thutmose commented 6 years ago

this is a problem with a vanilla thing, which things like sponge disable, I have it enabled by default, but then have a config option to disable it.

to fix this, you either need to op the ones that you want to be able to use op only commands, or you can try setting allCommandUse to true in the config. You can toggle this option ingame via /editperms allowUse true/false

Ryokoie commented 6 years ago

I did the following. Enabling it in config and command. Now I can't use commands at all without being opped:

Caused by: java.lang.NullPointerException at thut.permissions.PermissionsHolder.hasPermission(PermissionsHolder.java:38) ~[PermissionsHolder.class:?] at thut.permissions.GroupManager.hasPermission(GroupManager.java:85) ~[GroupManager.class:?] at thut.permissions.ThutPerms.canUse(ThutPerms.java:257) ~[ThutPerms.class:?] at thut.permissions.ThutPerms.commandUseEvent(ThutPerms.java:136) ~[ThutPerms.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_146_ThutPerms_commandUseEvent_CommandEvent.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?] at net.minecraft.command.CommandHandler.func_71556_a(CommandHandler.java:54) ~[bj.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:958) ~[pa.class:?] at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:937) ~[pa.class:?] at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) ~[la.class:?] at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) ~[la.class:?] at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) ~[hv$1.class:?] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_151] at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_151] at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?] ... 5 more

Sorry about all the headaches.

Thutmose commented 6 years ago

try updating thutperms for that last one, that looks like the bug that was fixed yesterday

tacogerbil commented 5 years ago

Was this ever reported as fixed? I'm having the identical issue. Permissions are set and wondertrade is not allowed. I also did as suggested with editperms allowUse true and no difference. Any help would be greatly appreciated :)

Thutmose commented 5 years ago

do you have sponge? if so, don't use this mod, use something else, sponge implements its own permissions api, which this mod does not use. if using sponge, use something like luckyperms instead

tacogerbil commented 5 years ago

No, I got rid of sponge long ago... conflicts too much with the lost world mod... Pure Forge ;)

Thutmose commented 5 years ago

can you confirm whether the thing not working actually uses forge permissions api?

Try this: do /editperms toggledebug Then do whatever isn't allowed Then send me the thutperms.log that it printed out during that time (or whatever showed in server console, it should print out whatever thutperms is doing until you run /editperms toggledebug again)

tacogerbil commented 5 years ago

Here you go ;) Sorry it took me a bit ;) . Giving you abit more just in case. latest.log thutessentials.log thutperms.log

Since I'm admin I deopped myself and put myself in the Miner (renamed default group) no real permissions added. here's the permissions json as well.

permissions.json.zip

Thutmose commented 5 years ago

According to that thutperms.log, the only perm check which was failed was techguns.allowunsafemode

Did you get any no perms warnings during that run? if so, can you send screenshots of them?

tacogerbil commented 5 years ago

Did it again... realized it still had me in mods group (as shown below). I used the terminal and moved myself to Miners then confirmed I was in a default (Miners) user group and NOT mods... thutperms.log latest.log

image

Thutmose commented 5 years ago

All of my "You do not have permission to use" messages say:

"You do not have permission to use \<command>" and are in white text, that red one isn't thutperms failing a perms test, it is the mod you are using not checking forge permissions api, and instead doing something else (I suspect it is manually checking the ops list or something)

That isn't something on my end, it is on their end for not using forge permissions

Thutmose commented 5 years ago

Though, according to thutperms.log, you don't have command.wondertrade on that group, try adding it to the perms for it

tacogerbil commented 5 years ago

But if I DO NOT have thutperms installed it works and they get no denial without being ops.... Wouldn't they be getting a similar denial if it was looking for op? I was using FTB utils until recently and those permissions worked for theirs fine.. I could block and unblock via perms as well.

On Sat, Jan 12, 2019 at 10:02 PM Thutmose notifications@github.com wrote:

All of my "You do not have permission to use" messages say:

"You do not have permission to use " and are in white text, that red one isn't thutperms failing a perms test, it is the mod you are using not checking forge permissions api, and instead doing something else (I suspect it is manually checking the ops list or something)

That isn't something on my end, it is on their end for not using forge permissions

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Thutmose/ThutPerms/issues/20#issuecomment-453804831, or mute the thread https://github.com/notifications/unsubscribe-auth/AMXIc8aijfBaQXhuFUMcQnnR2jU_hljwks5vCswEgaJpZM4T07_b .

Thutmose commented 5 years ago

did you give that group the "command.wondertrade" perm?

If it worked with FTB perms, it should work with this one, as they both use forge permissions api.

The only possibly related perms being checked according to that log were the following: command.wondertrade - failed due to no perms for group command.repair - failed due to no perms for group

tacogerbil commented 5 years ago

........ Where to start. Ultimately you were right. Where the confusion is this...
Forge Essentials never seemed to recognize the command. I tried using it and it just never worked. ALWAYS denied non ops. FTBUtils recognized it but the permission for the command was command.wondertrade.wondertrade The wondertrade wiki says the permission node is wondertrade.command.wondertrade YOU and the log (if I would have noticed it ) said they were looking for command.wondertrade

I changed to command.wondertrade and it worked.

Sorry to have taken up your important time.... I never imagined the permission node could change between different perm mods.... Have a wonderful night, and than you for the hard work you do on your mods. Seriously grateful.

Thutmose commented 5 years ago

command permissions are entirely up to the permissions mod to assign, as there is no default standard for them.