ForgeEssentials

ForgeEssentials

339k Downloads

command block permissions for /zone command

zwrm1 opened this issue · 9 comments

commented

hey guys, i was attempting to do something like "/zone exit zoneid message" via a command block its returning "you do not have permission to use this command" any thoughts?

($COMMANDBLOCK seems to have * granted in the permissions file, and using build 1167)

commented

Try enabling /p debug and try again 😉

commented

I have noticed this also happens when trying to run commands that should be run by a player. As a recall, command blocks are not a fake player but are actually extensions of console.

commented

I have tried /p debug but it doesn't give any output on which permissions might be being checked (almost like it's not checking any).

BTW I am a developer (20 years commercial experience) and I have an interest in contributing to this project on a small scale (not as a lead but perhaps learning enough to fix a bug or two, if you are interested :)

commented

Regarding development: sounds good. You should say hi on our IRC.

As for the issue: You need to use /p debug as a player and you need to stand somewhere around the command block or it will not show the permission check. If that's what you did, I might have to check it myself....

commented

Yes that's what did, I was standing next to it clicking a button attached to the command block. I have attached screen shots so you can see the setup and the output. Thanks for your assistance with this, btw, as well as your work in general. I can tell be reading the posts here that you contribute a significant amount of your time :)

Uploading 20160511_180259.jpg…

commented

20160511_180259
20160511_180210

commented

this seems to affect some other command block commands as well (maybe many...) for example /morph demorph also produces the same output. I think this might be a very general problem with the way command block permissions are handled.

commented

also, this may be affecting scripting as well, as I have tried to make some scripted commands to do the same things, but get similar permission errors.

commented

This is a issue in multiple places in the code. A lot of methods either fail if the sender is not an entity player or only consider a class of instance MinecraftServer as a console based sender. The change I made in PR #2088 includes some code that should fix the issue with command blocks, etc in scripting as long as you give the command block sender access to the command you want it to run in the permissions. Since this is happening in multiple places, there are a fail amount of fixes that need to be done.